diff --git a/src/core/course/pages/section-selector/section-selector.html b/src/core/course/pages/section-selector/section-selector.html index 3f24ebe7d..eee9fab1a 100644 --- a/src/core/course/pages/section-selector/section-selector.html +++ b/src/core/course/pages/section-selector/section-selector.html @@ -10,7 +10,7 @@ - +

{{ 'core.course.nocontentavailable' | translate }} diff --git a/src/core/course/pages/section-selector/section-selector.ts b/src/core/course/pages/section-selector/section-selector.ts index 0f1f23933..ff76889fc 100644 --- a/src/core/course/pages/section-selector/section-selector.ts +++ b/src/core/course/pages/section-selector/section-selector.ts @@ -28,13 +28,10 @@ export class CoreCourseSectionSelectorPage { sections: any; selected: number; - sectionHasContent: any; constructor(navParams: NavParams, courseHelper: CoreCourseHelperProvider, private viewCtrl: ViewController) { this.sections = navParams.get('sections'); this.selected = navParams.get('selected'); - - this.sectionHasContent = courseHelper.sectionHasContent; } /** diff --git a/src/core/course/pages/section/section.ts b/src/core/course/pages/section/section.ts index 9c3bb2e47..f236ae11f 100644 --- a/src/core/course/pages/section/section.ts +++ b/src/core/course/pages/section/section.ts @@ -194,7 +194,8 @@ export class CoreCourseSectionPage implements OnDestroy { // Add a fake first section (all sections). this.sections.unshift({ name: this.translate.instant('core.course.allsections'), - id: CoreCourseProvider.ALL_SECTIONS_ID + id: CoreCourseProvider.ALL_SECTIONS_ID, + hasContent: true }); } diff --git a/src/core/course/providers/helper.ts b/src/core/course/providers/helper.ts index 46f026e67..af4aeea19 100644 --- a/src/core/course/providers/helper.ts +++ b/src/core/course/providers/helper.ts @@ -1168,7 +1168,7 @@ export class CoreCourseHelperProvider { * @return {boolean} Whether the section has content. */ sectionHasContent(section: any): boolean { - if (section.id == CoreCourseProvider.ALL_SECTIONS_ID || section.hiddenbynumsections) { + if (section.hiddenbynumsections) { return false; }