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