diff --git a/src/core/features/course/services/module-delegate.ts b/src/core/features/course/services/module-delegate.ts index ba49c4c72..f2faeac31 100644 --- a/src/core/features/course/services/module-delegate.ts +++ b/src/core/features/course/services/module-delegate.ts @@ -299,11 +299,17 @@ export class CoreCourseModuleDelegateService extends CoreDelegate { - return await this.executeFunctionOnEnabled( + const data = await this.executeFunctionOnEnabled( modname, 'getData', [module, courseId, sectionId, forCoursePage], ); + + if (data) { + data.showDownloadButton = data.showDownloadButton ?? true; + } + + return data; } /**