diff --git a/src/core/features/course/format/singleactivity/services/handlers/singleactivity-format.ts b/src/core/features/course/format/singleactivity/services/handlers/singleactivity-format.ts index 8e4b1f6d3..999a1c08c 100644 --- a/src/core/features/course/format/singleactivity/services/handlers/singleactivity-format.ts +++ b/src/core/features/course/format/singleactivity/services/handlers/singleactivity-format.ts @@ -59,13 +59,7 @@ export class CoreCourseFormatSingleActivityHandlerService implements CoreCourseF return sections[0].modules[0].name; } - if (course.displayname) { - return course.displayname; - } else if (course.fullname) { - return course.fullname; - } - - return ''; + return course.fullname || ''; } /** diff --git a/src/core/features/course/services/handlers/default-format.ts b/src/core/features/course/services/handlers/default-format.ts index 5a4833f15..ff60f6c39 100644 --- a/src/core/features/course/services/handlers/default-format.ts +++ b/src/core/features/course/services/handlers/default-format.ts @@ -40,13 +40,7 @@ export class CoreCourseFormatDefaultHandler implements CoreCourseFormatHandler { * @inheritdoc */ getCourseTitle(course: CoreCourseAnyCourseData): string { - if (course.displayname) { - return course.displayname; - } else if (course.fullname) { - return course.fullname; - } - - return ''; + return course.fullname || ''; } /**