+ @if (video) {
+
+ Lecture: {{ video.title }}
+ Instructor: {{ video.lecturer }}
+
+ }
+
+ Please rate the following aspects of this lecture (optional), then click Continue.
+
+
+ Instructor's Delivery
+
+
+
+ Usefulness of Material
+
+
+
+ Audio/Video Quality
+
+
+
+ Thank you for taking the time to complete the survey.
+
+
diff --git a/src/app/home/course/modal-evaluation.component.ts b/src/app/home/course/modal-evaluation.component.ts
new file mode 100644
index 0000000..2d9d0cc
--- /dev/null
+++ b/src/app/home/course/modal-evaluation.component.ts
@@ -0,0 +1,38 @@
+import {Component, Input} from '@angular/core';
+import {FormsModule} from '@angular/forms';
+
+import {IonButton, IonButtons, IonContent, IonHeader, IonItem, IonLabel, IonTitle, IonToolbar, ModalController} from '@ionic/angular/standalone';
+import {Lecture, ManService} from '../../man.service';
+import {Rating} from 'primeng/rating';
+
+@Component({
+ selector: 'app-modal-evaluation',
+ templateUrl: 'modal-evaluation.component.html',
+ imports: [FormsModule, IonButton, IonButtons, IonContent, IonHeader, IonItem, IonTitle, IonToolbar, Rating, IonLabel],
+})
+export class ModalEvaluationComponent {
+ @Input() video: Lecture;
+ result: {
+ delivery: number | null;
+ material: number | null;
+ video: number | null;
+ } = {
+ delivery: null,
+ material: null,
+ video: null,
+ };
+
+ constructor(private manService: ManService, private modalCtrl: ModalController) {
+ }
+
+ cancel() {
+ return this.modalCtrl.dismiss(null, 'cancel');
+ }
+
+ confirm() {
+ if (this.video && (this.result.delivery || this.result.material || this.result.video)) {
+ this.manService.sendEvaluation('end_play', this.video.id, this.result).subscribe();
+ }
+ return this.modalCtrl.dismiss(this.result, 'confirm');
+ }
+}
diff --git a/src/app/man.service.ts b/src/app/man.service.ts
index 03cd8f4..42c31f9 100644
--- a/src/app/man.service.ts
+++ b/src/app/man.service.ts
@@ -96,26 +96,31 @@ export class ManService {
}));
}
- getPlayRecord(year: string, course: string, courseId: string|null, stopPolling: Observable