MOBILE-4270 course: Remove summary component
This hasn't been used for a long time, so it can be removed.main
parent
98d332138a
commit
605d1c09a4
|
@ -81,7 +81,6 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
|||
|
||||
// All the possible component classes.
|
||||
courseFormatComponent?: Type<unknown>;
|
||||
courseSummaryComponent?: Type<unknown>;
|
||||
singleSectionComponent?: Type<unknown>;
|
||||
allSectionsComponent?: Type<unknown>;
|
||||
|
||||
|
@ -230,7 +229,6 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
|||
|
||||
await Promise.all([
|
||||
this.loadCourseFormatComponent(),
|
||||
this.loadCourseSummaryComponent(),
|
||||
this.loadSingleSectionComponent(),
|
||||
this.loadAllSectionsComponent(),
|
||||
]);
|
||||
|
@ -246,15 +244,6 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
|||
this.courseFormatComponent = await CoreCourseFormatDelegate.getCourseFormatComponent(this.course);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load course summary component.
|
||||
*
|
||||
* @returns Promise resolved when done.
|
||||
*/
|
||||
protected async loadCourseSummaryComponent(): Promise<void> {
|
||||
this.courseSummaryComponent = await CoreCourseFormatDelegate.getCourseSummaryComponent(this.course);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load single section component.
|
||||
*
|
||||
|
|
|
@ -136,15 +136,6 @@ export interface CoreCourseFormatHandler extends CoreDelegateHandler {
|
|||
*/
|
||||
getCourseFormatComponent?(course: CoreCourseAnyCourseData): Promise<Type<unknown> | undefined>;
|
||||
|
||||
/**
|
||||
* Return the Component to use to display the course summary inside the default course format.
|
||||
* It's recommended to return the class of the component, but you can also return an instance of the component.
|
||||
*
|
||||
* @param course The course to render.
|
||||
* @returns Promise resolved with component to use, undefined if not found.
|
||||
*/
|
||||
getCourseSummaryComponent?(course: CoreCourseAnyCourseData): Promise<Type<unknown> | undefined>;
|
||||
|
||||
/**
|
||||
* Return the Component to use to display a single section. This component will only be used if the user is viewing a
|
||||
* single section. If all the sections are displayed at once then it won't be used.
|
||||
|
@ -273,20 +264,6 @@ export class CoreCourseFormatDelegateService extends CoreDelegate<CoreCourseForm
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the component to use to display the course summary in the default course format.
|
||||
*
|
||||
* @param course The course to render.
|
||||
* @returns Promise resolved with component to use, undefined if not found.
|
||||
*/
|
||||
async getCourseSummaryComponent(course: CoreCourseAnyCourseData): Promise<Type<unknown> | undefined> {
|
||||
try {
|
||||
return await this.executeFunctionOnEnabled<Type<unknown>>(course.format || '', 'getCourseSummaryComponent', [course]);
|
||||
} catch (error) {
|
||||
this.logger.error('Error getting course summary component', error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a course, return the title to use in the course page.
|
||||
*
|
||||
|
|
|
@ -4,6 +4,7 @@ information provided here is intended especially for developers.
|
|||
=== 4.2.0 ===
|
||||
|
||||
- CoreIconComponent has been removed after deprecation period: Use CoreFaIconDirective instead.
|
||||
- The courseSummaryComponent property has been removed from the CoreCourseFormatComponent component, and the getCourseSummaryComponent method from the CoreCourseFormatHandler interface.
|
||||
|
||||
=== 4.1.0 ===
|
||||
|
||||
|
|
Loading…
Reference in New Issue