From 6041ec01374f45237e70b3c8ce7111cc1fd8555c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Fri, 21 Jan 2022 16:07:16 +0100 Subject: [PATCH] MOBILE-3814 course: Change contents tab string --- scripts/langindex.json | 1 - src/core/features/course/lang.json | 1 - src/core/features/course/pages/contents/contents.ts | 2 +- src/core/features/course/pages/index/index.page.ts | 2 +- src/core/features/course/pages/preview/preview.html | 9 ++++----- src/core/features/course/pages/preview/preview.page.ts | 5 +---- 6 files changed, 7 insertions(+), 13 deletions(-) diff --git a/scripts/langindex.json b/scripts/langindex.json index 0e36b6e0c..79ac9b310 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -1515,7 +1515,6 @@ "core.course.confirmdownloadzerosize": "local_moodlemobileapp", "core.course.confirmlimiteddownload": "local_moodlemobileapp", "core.course.confirmpartialdownloadsize": "local_moodlemobileapp", - "core.course.contents": "local_moodlemobileapp", "core.course.couldnotloadsectioncontent": "local_moodlemobileapp", "core.course.couldnotloadsections": "local_moodlemobileapp", "core.course.coursesummary": "moodle", diff --git a/src/core/features/course/lang.json b/src/core/features/course/lang.json index bba7ba758..f6f144b2d 100644 --- a/src/core/features/course/lang.json +++ b/src/core/features/course/lang.json @@ -26,7 +26,6 @@ "confirmdownloadzerosize": "You are about to start downloading.{{availableSpace}} Are you sure you want to continue?", "confirmpartialdownloadsize": "You are about to download at least {{size}}.{{availableSpace}} Are you sure you want to continue?", "confirmlimiteddownload": "You are not currently connected to Wi-Fi. ", - "contents": "Contents", "gotonextactivity": "Continue to next activity", "gotonextactivitynotfound": "Next activity not found. It's possible that it has been hidden or deleted.", "gotopreviousactivity": "Continue to previous activity", diff --git a/src/core/features/course/pages/contents/contents.ts b/src/core/features/course/pages/contents/contents.ts index 43bbcfb2d..a4de288f3 100644 --- a/src/core/features/course/pages/contents/contents.ts +++ b/src/core/features/course/pages/contents/contents.ts @@ -385,7 +385,7 @@ export class CoreCourseContentsPage implements OnInit, OnDestroy { openCourseSummary(): void { CoreNavigator.navigateToSitePath( '/course/' + this.course.id + '/preview', - { params: { course: this.course, avoidOpenCourse: true } }, + { params: { course: this.course } }, ); } diff --git a/src/core/features/course/pages/index/index.page.ts b/src/core/features/course/pages/index/index.page.ts index 68ae06832..096de4843 100644 --- a/src/core/features/course/pages/index/index.page.ts +++ b/src/core/features/course/pages/index/index.page.ts @@ -51,7 +51,7 @@ export class CoreCourseIndexPage implements OnInit, OnDestroy { protected isGuest?: boolean; protected contentsTab: CoreTabsOutletTab = { page: CONTENTS_PAGE_NAME, - title: 'core.course.contents', + title: 'core.course', pageParams: {}, }; diff --git a/src/core/features/course/pages/preview/preview.html b/src/core/features/course/pages/preview/preview.html index 92b3ff1eb..4969b265b 100644 --- a/src/core/features/course/pages/preview/preview.html +++ b/src/core/features/course/pages/preview/preview.html @@ -21,8 +21,8 @@
- +

@@ -121,11 +121,10 @@

{{ 'core.course.refreshcourse' | translate }}

- + -

{{ 'core.course.contents' | translate }}

+

{{ 'core.course' | translate }}

diff --git a/src/core/features/course/pages/preview/preview.page.ts b/src/core/features/course/pages/preview/preview.page.ts index 65fd8e105..923eb7109 100644 --- a/src/core/features/course/pages/preview/preview.page.ts +++ b/src/core/features/course/pages/preview/preview.page.ts @@ -51,7 +51,6 @@ export class CoreCoursePreviewPage implements OnInit, OnDestroy { selfEnrolInstances: CoreCourseEnrolmentMethod[] = []; paypalEnabled = false; dataLoaded = false; - avoidOpenCourse = false; prefetchCourseData: CorePrefetchStatusInfo = { icon: '', statusTranslatable: 'core.loading', @@ -97,7 +96,6 @@ export class CoreCoursePreviewPage implements OnInit, OnDestroy { */ async ngOnInit(): Promise { this.course = CoreNavigator.getRouteParam('course'); - this.avoidOpenCourse = !!CoreNavigator.getRouteBooleanParam('avoidOpenCourse'); if (!this.course) { CoreNavigator.back(); @@ -238,8 +236,7 @@ export class CoreCoursePreviewPage implements OnInit, OnDestroy { * Open the course. */ openCourse(): void { - if (!this.canAccessCourse || this.avoidOpenCourse) { - // Course cannot be opened or we are avoiding opening because we accessed from inside a course. + if (!this.canAccessCourse) { return; }