-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54b3c47
commit 67b1dbb
Showing
8 changed files
with
1,077 additions
and
816 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-title>Evaluation</ion-title> | ||
<ion-buttons slot="end"> | ||
<ion-button (click)="confirm()" [strong]="true">Continue</ion-button> | ||
</ion-buttons> | ||
</ion-toolbar> | ||
</ion-header> | ||
<ion-content class="ion-padding"> | ||
@if (video) { | ||
<div style="border-left: 4px solid #1976d2; padding-left: 1rem;"> | ||
<span style="font-weight: bold">Lecture:</span> {{ video.title }}<br/> | ||
<span style="font-weight: bold">Instructor:</span> {{ video.lecturer }} | ||
</div> | ||
} | ||
<p> | ||
Please rate the following aspects of this lecture (optional), then click Continue. | ||
</p> | ||
<ion-item> | ||
<ion-label>Instructor's Delivery</ion-label> | ||
<p-rating [(ngModel)]="result.delivery"/> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label>Usefulness of Material</ion-label> | ||
<p-rating [(ngModel)]="result.material"/> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label>Audio/Video Quality</ion-label> | ||
<p-rating [(ngModel)]="result.video"/> | ||
</ion-item> | ||
<p style="margin-top: 2rem"> | ||
Thank you for taking the time to complete the survey. | ||
</p> | ||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters