From a6fb4a51bc38b4278999a64887f53de1b78547fb Mon Sep 17 00:00:00 2001 From: Mark Johnson Date: Thu, 20 Dec 2018 09:38:15 +0000 Subject: [PATCH] MOBILE-2721 Keep existing displayname if not set core_enrol_get_users_courses does not return displayname before MDL-63523, which causes the page title to revert to fullname after the course has fully loaded. --- src/core/course/pages/section/section.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/course/pages/section/section.ts b/src/core/course/pages/section/section.ts index 1a048fc84..9289f5d46 100644 --- a/src/core/course/pages/section/section.ts +++ b/src/core/course/pages/section/section.ts @@ -171,6 +171,10 @@ export class CoreCourseSectionPage implements OnDestroy { // Error getting the course, probably guest access. }).then((course) => { if (course) { + if (this.course.id === course.id && this.course.hasOwnProperty('displayname') + && !course.hasOwnProperty('displayname')) { + course.displayname = this.course.displayname; + } this.course = course; }