From a4c98b06b17bf27dd26b8f581cd7e355ec01a7d5 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 23 Aug 2018 12:24:06 +0200 Subject: [PATCH] MOBILE-2559 course: Display right badges in stealth section & module --- src/core/course/components/module/core-course-module.html | 3 ++- src/core/course/lang/en.json | 1 + src/core/course/pages/section-selector/section-selector.html | 2 +- src/core/course/providers/helper.ts | 3 +++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/course/components/module/core-course-module.html b/src/core/course/components/module/core-course-module.html index 7780f423f..d5c91e4d1 100644 --- a/src/core/course/components/module/core-course-module.html +++ b/src/core/course/components/module/core-course-module.html @@ -30,11 +30,12 @@ -
+
{{ 'core.course.hiddenfromstudents' | translate }} + {{ 'core.course.hiddenoncoursepage' | translate }}
diff --git a/src/core/course/lang/en.json b/src/core/course/lang/en.json index b003ae145..e21a91a95 100644 --- a/src/core/course/lang/en.json +++ b/src/core/course/lang/en.json @@ -17,6 +17,7 @@ "errordownloadingsection": "Error downloading section.", "errorgetmodule": "Error getting activity data.", "hiddenfromstudents": "Hidden from students", + "hiddenoncoursepage": "Available but not shown on course page", "nocontentavailable": "No content available at the moment.", "overriddennotice": "Your final grade from this activity was manually adjusted.", "refreshcourse": "Refresh course", diff --git a/src/core/course/pages/section-selector/section-selector.html b/src/core/course/pages/section-selector/section-selector.html index dcdd72a9c..a1d6acde4 100644 --- a/src/core/course/pages/section-selector/section-selector.html +++ b/src/core/course/pages/section-selector/section-selector.html @@ -13,7 +13,7 @@

- {{ 'core.course.nocontentavailable' | translate }} + {{ 'core.course.hiddenfromstudents' | translate }}
diff --git a/src/core/course/providers/helper.ts b/src/core/course/providers/helper.ts index 99aed6fd0..859b36fa9 100644 --- a/src/core/course/providers/helper.ts +++ b/src/core/course/providers/helper.ts @@ -151,6 +151,9 @@ export class CoreCourseHelperProvider { module.completionstatus = completionStatus[module.id]; module.completionstatus.courseId = courseId; } + + // Check if the module is stealth. + module.isStealth = !module.visibleoncoursepage || (module.visible && !section.visible); }); });