commit
05bdd26a53
|
@ -16,7 +16,7 @@
|
|||
|
||||
<core-tabs [hideUntil]="loaded" [selectedIndex]="selectedTab">
|
||||
<!-- Index/Preview tab. -->
|
||||
<core-tab [title]="'addon.mod_lesson.preview' | translate">
|
||||
<core-tab [title]="'addon.mod_lesson.preview' | translate" (ionSelect)="indexSelected()">
|
||||
<ng-template>
|
||||
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId"></core-course-module-description>
|
||||
|
||||
|
|
|
@ -384,10 +384,19 @@ export class AddonModLessonIndexComponent extends CoreCourseModuleMainActivityCo
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* First tab selected.
|
||||
*/
|
||||
indexSelected(): void {
|
||||
this.selectedTab = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports tab selected.
|
||||
*/
|
||||
reportsSelected(): void {
|
||||
this.selectedTab = 1;
|
||||
|
||||
if (!this.groupInfo) {
|
||||
this.fetchReportData().catch((error) => {
|
||||
this.domUtils.showErrorModalDefault(error, 'Error getting report.');
|
||||
|
|
Loading…
Reference in New Issue