MOBILE-3320 lesson: Remove sync review button after clicked

main
Dani Palou 2021-06-15 15:37:51 +02:00
parent 22edea2dfc
commit 7de65ddd5a
2 changed files with 11 additions and 8 deletions

View File

@ -470,13 +470,13 @@ export class AddonModLessonIndexComponent extends CoreCourseModuleMainActivityCo
/**
* Review the lesson.
*/
review(): void {
async review(): Promise<void> {
if (!this.retakeToReview || !this.lesson) {
// No retake to review, stop.
return;
}
CoreNavigator.navigateToSitePath(
await CoreNavigator.navigateToSitePath(
`${AddonModLessonModuleHandlerService.PAGE_NAME}/${this.courseId}/${this.module.id}/player`,
{
params: {
@ -487,6 +487,8 @@ export class AddonModLessonIndexComponent extends CoreCourseModuleMainActivityCo
},
},
);
this.retakeToReview = undefined;
}
/**

View File

@ -186,13 +186,14 @@
</ion-list>
<!-- End of lesson reached. -->
<ion-card class="core-warning-card" *ngIf="eolData && !processData && eolData.offline?.value">
<ion-item>
<ion-icon name="fas-exclamation-triangle" slot="start" aria-hidden="true"></ion-icon>
<ion-label>{{ 'addon.mod_lesson.finishretakeoffline' | translate }}</ion-label>
</ion-item>
</ion-card>
<ion-card *ngIf="eolData && !processData">
<div class="core-warning-card" *ngIf="eolData.offline?.value">
<ion-item>
<ion-icon name="fas-exclamation-triangle" slot="start" aria-hidden="true"></ion-icon>
<ion-label>{{ 'addon.mod_lesson.finishretakeoffline' | translate }}</ion-label>
</ion-item>
</div>
<ion-card-header class="ion-text-wrap" *ngIf="eolData.gradelesson">
<ion-card-title>{{ 'addon.mod_lesson.congratulations' | translate }}</ion-card-title>