Skip to content

Commit

Permalink
refactor: remove scorm extension deny button
Browse files Browse the repository at this point in the history
  • Loading branch information
satikaj committed Jun 11, 2024
1 parent 4b983ba commit 5def11c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 27 deletions.
5 changes: 0 additions & 5 deletions src/app/api/models/task-comment/scorm-extension-comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ export class ScormExtensionComment extends TaskComment {
);
}

public deny(): Observable<TaskComment> {
this.granted = false;
return this.assessScormExtension();
}

public grant(): Observable<TaskComment> {
this.granted = true;
return this.assessScormExtension();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@
<strong> reason:</strong> {{ comment.text }}
</p>
@if (isNotStudent) {
<div class="flex flex-row justify-evenly items-center">
<button
(click)="grantExtension()"
mat-flat-button
color="primary"
style="background-color: #43a047"
>
Grant
</button>
<button (click)="denyExtension()" mat-flat-button color="warn">Deny</button>
</div>
<button
(click)="grantExtension()"
mat-flat-button
color="primary"
style="background-color: #43a047"
>
Grant
</button>
}
<hr class="hr-fade" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ export class ScormExtensionCommentComponent implements OnInit {
return this.task.unit.currentUserIsStaff;
}

denyExtension() {
this.comment.deny().subscribe({
next: (tc: TaskComment) => {
this.alerts.success('Attempt request denied', 2000);
},
error: (response) => {
this.handleError(response);
},
});
}

grantExtension() {
this.comment.grant().subscribe({
next: (tc: TaskComment) => {
Expand Down

0 comments on commit 5def11c

Please sign in to comment.