diff --git a/src/core/course/components/format/core-course-format.html b/src/core/course/components/format/core-course-format.html index 58fa13eae..de9a9ad44 100644 --- a/src/core/course/components/format/core-course-format.html +++ b/src/core/course/components/format/core-course-format.html @@ -9,10 +9,7 @@ - -
- -
+ diff --git a/src/core/course/pages/section/section.ts b/src/core/course/pages/section/section.ts index 991a67d93..19858d405 100644 --- a/src/core/course/pages/section/section.ts +++ b/src/core/course/pages/section/section.ts @@ -241,19 +241,6 @@ export class CoreCourseSectionPage implements OnDestroy { }); })); - // Get the overview files. - if (this.course.overviewfiles) { - this.course.imageThumb = this.course.overviewfiles[0] && this.course.overviewfiles[0].fileurl; - } else if (this.coursesProvider.isGetCoursesByFieldAvailable()) { - promises.push(this.coursesProvider.getCoursesByField('id', this.course.id).then((coursesInfo) => { - if (coursesInfo[0] && coursesInfo[0].overviewfiles && coursesInfo[0].overviewfiles[0]) { - this.course.imageThumb = coursesInfo[0].overviewfiles[0].fileurl; - } else { - this.course.imageThumb = false; - } - })); - } - // Load the course handlers. promises.push(this.courseOptionsDelegate.getHandlersToDisplay(this.injector, this.course, refresh, false) .then((handlers) => { @@ -330,7 +317,6 @@ export class CoreCourseSectionPage implements OnDestroy { promises.push(this.courseProvider.invalidateSections(this.course.id)); promises.push(this.coursesProvider.invalidateUserCourses()); promises.push(this.courseFormatDelegate.invalidateData(this.course, this.sections)); - promises.push(this.coursesProvider.invalidateCoursesByField('id', this.course.id)); if (this.sections) { promises.push(this.prefetchDelegate.invalidateCourseUpdates(this.course.id)); diff --git a/src/core/courses/components/course-progress/core-courses-course-progress.html b/src/core/courses/components/course-progress/core-courses-course-progress.html index 01db00893..df001f2b0 100644 --- a/src/core/courses/components/course-progress/core-courses-course-progress.html +++ b/src/core/courses/components/course-progress/core-courses-course-progress.html @@ -1,6 +1,6 @@ -
- +
+
diff --git a/src/core/courses/pages/course-preview/course-preview.html b/src/core/courses/pages/course-preview/course-preview.html index cf62ca683..2a52bad10 100644 --- a/src/core/courses/pages/course-preview/course-preview.html +++ b/src/core/courses/pages/course-preview/course-preview.html @@ -10,8 +10,8 @@ -
- +
+
diff --git a/src/core/courses/pages/course-preview/course-preview.ts b/src/core/courses/pages/course-preview/course-preview.ts index 703894eaa..ce2b0d7cd 100644 --- a/src/core/courses/pages/course-preview/course-preview.ts +++ b/src/core/courses/pages/course-preview/course-preview.ts @@ -101,7 +101,7 @@ export class CoreCoursesCoursePreviewPage implements OnDestroy { this.courseUrl = this.textUtils.concatenatePaths(currentSiteUrl, 'course/view.php?id=' + this.course.id); this.paypalReturnUrl = this.textUtils.concatenatePaths(currentSiteUrl, 'enrol/paypal/return.php'); if (this.course.overviewfiles && this.course.overviewfiles.length > 0) { - this.course.imageThumb = this.course.overviewfiles[0].fileurl; + this.course.courseImage = this.course.overviewfiles[0].fileurl; } // Initialize the self enrol modal. diff --git a/src/core/courses/providers/helper.ts b/src/core/courses/providers/helper.ts index 87d168465..934d5e35a 100644 --- a/src/core/courses/providers/helper.ts +++ b/src/core/courses/providers/helper.ts @@ -36,13 +36,13 @@ export class CoreCoursesHelperProvider { course.displayname = courseByField.displayname; if (courseByField.overviewfiles && courseByField.overviewfiles[0]) { - course.imageThumb = courseByField.overviewfiles[0].fileurl; + course.courseImage = courseByField.overviewfiles[0].fileurl; } else { - course.imageThumb = false; + course.courseImage = false; } } else { delete course.displayname; - course.imageThumb = false; + course.courseImage = false; } }