From feefaa083f4837103db2da99e8ad9fca634d15f9 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Mon, 7 Mar 2022 09:21:01 +0100 Subject: [PATCH] MOBILE-3967 course: Allow using legacy completion in 3.11+ --- .../img/completion/completion-auto-n-override.svg | 2 +- .../img/completion/completion-auto-y-override.svg | 2 +- .../img/completion/completion-manual-n-override.svg | 2 +- .../img/completion/completion-manual-y-override.svg | 2 +- .../course/components/module/core-course-module.html | 12 +++++++----- src/core/features/course/components/module/module.ts | 4 ++-- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/assets/img/completion/completion-auto-n-override.svg b/src/assets/img/completion/completion-auto-n-override.svg index bffccb8b8..74fe158d4 100644 --- a/src/assets/img/completion/completion-auto-n-override.svg +++ b/src/assets/img/completion/completion-auto-n-override.svg @@ -1 +1 @@ - height="16" viewBox="0 0 16 16" preserveAspectRatio="xMinYMid meet" overflow="visible"> + \ No newline at end of file diff --git a/src/assets/img/completion/completion-auto-y-override.svg b/src/assets/img/completion/completion-auto-y-override.svg index 375e13266..1f4293f10 100644 --- a/src/assets/img/completion/completion-auto-y-override.svg +++ b/src/assets/img/completion/completion-auto-y-override.svg @@ -1 +1 @@ - height="16" viewBox="0 0 16 16" preserveAspectRatio="xMinYMid meet" overflow="visible"> + \ No newline at end of file diff --git a/src/assets/img/completion/completion-manual-n-override.svg b/src/assets/img/completion/completion-manual-n-override.svg index 9b929eafd..6c6d6484b 100644 --- a/src/assets/img/completion/completion-manual-n-override.svg +++ b/src/assets/img/completion/completion-manual-n-override.svg @@ -1 +1 @@ - height="16" viewBox="0 0 16 16" preserveAspectRatio="xMinYMid meet" overflow="visible"> + \ No newline at end of file diff --git a/src/assets/img/completion/completion-manual-y-override.svg b/src/assets/img/completion/completion-manual-y-override.svg index 849e3efc9..ad0db0c06 100644 --- a/src/assets/img/completion/completion-manual-y-override.svg +++ b/src/assets/img/completion/completion-manual-y-override.svg @@ -1 +1 @@ - height="16" viewBox="0 0 16 16" preserveAspectRatio="xMinYMid meet" overflow="visible"> + \ No newline at end of file diff --git a/src/core/features/course/components/module/core-course-module.html b/src/core/features/course/components/module/core-course-module.html index 17e53f4e1..60e2ece03 100644 --- a/src/core/features/course/components/module/core-course-module.html +++ b/src/core/features/course/components/module/core-course-module.html @@ -23,9 +23,10 @@
- + - +
(); // Notify when module completion changes. modNameTranslated = ''; hasInfo = false; - showLegacyCompletion = false; // Whether to show module completion in the old format. showManualCompletion = false; // Whether to show manual completion when completion conditions are disabled. prefetchStatusIcon = ''; // Module prefetch status icon. prefetchStatusText = ''; // Module prefetch status text. @@ -66,7 +66,7 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy { */ async ngOnInit(): Promise { this.modNameTranslated = CoreCourse.translateModuleName(this.module.modname) || ''; - this.showLegacyCompletion = !CoreSites.getCurrentSite()?.isVersionGreaterEqualThan('3.11'); + this.showLegacyCompletion = this.showLegacyCompletion ?? !CoreSites.getCurrentSite()?.isVersionGreaterEqualThan('3.11'); this.checkShowManualCompletion(); if (!this.module.handlerData) {