diff --git a/src/addon/mod/lesson/components/index/addon-mod-lesson-index.html b/src/addon/mod/lesson/components/index/addon-mod-lesson-index.html index 61a19ce3c..c0c7b311a 100644 --- a/src/addon/mod/lesson/components/index/addon-mod-lesson-index.html +++ b/src/addon/mod/lesson/components/index/addon-mod-lesson-index.html @@ -58,7 +58,7 @@ {{ 'addon.mod_lesson.review' | translate }} - +

@@ -73,7 +73,7 @@
- +

@@ -87,7 +87,7 @@

- + {{ 'core.start' | translate }} @@ -98,6 +98,14 @@
+ + + + + {{ 'addon.mod_lesson.continue' | translate }} + + + diff --git a/src/addon/mod/lesson/components/index/index.ts b/src/addon/mod/lesson/components/index/index.ts index 0f98b9444..3750b56dc 100644 --- a/src/addon/mod/lesson/components/index/index.ts +++ b/src/addon/mod/lesson/components/index/index.ts @@ -56,6 +56,7 @@ export class AddonModLessonIndexComponent extends CoreCourseModuleMainActivityCo reportLoaded: boolean; // Whether the report data has been loaded. selectedGroupName: string; // The name of the selected group. overview: any; // Reports overview data. + finishedOffline: boolean; // Whether a retake was finished in offline. protected syncEventName = AddonModLessonSyncProvider.AUTO_SYNCED; protected accessInfo: any; // Lesson access info. @@ -159,6 +160,11 @@ export class AddonModLessonIndexComponent extends CoreCourseModuleMainActivityCo } })); + // Check if the ser has a finished retake in offline. + promises.push(this.lessonOffline.hasFinishedRetake(this.lesson.id).then((finished) => { + this.finishedOffline = finished; + })); + // Update the list of content pages viewed and question attempts. promises.push(this.lessonProvider.getContentPagesViewedOnline(this.lesson.id, info.attemptscount)); promises.push(this.lessonProvider.getQuestionsAttemptsOnline(this.lesson.id, info.attemptscount));