MOBILE-3833 storage: Show download buttons on downloadable modules

main
Pau Ferrer Ocaña 2022-04-05 14:48:57 +02:00
parent 2ac0a02fee
commit 8f0c0bcfbb
1 changed files with 7 additions and 1 deletions

View File

@ -299,11 +299,17 @@ export class CoreCourseModuleDelegateService extends CoreDelegate<CoreCourseModu
sectionId?: number, sectionId?: number,
forCoursePage?: boolean, forCoursePage?: boolean,
): Promise<CoreCourseModuleHandlerData | undefined> { ): Promise<CoreCourseModuleHandlerData | undefined> {
return await this.executeFunctionOnEnabled<CoreCourseModuleHandlerData>( const data = await this.executeFunctionOnEnabled<CoreCourseModuleHandlerData>(
modname, modname,
'getData', 'getData',
[module, courseId, sectionId, forCoursePage], [module, courseId, sectionId, forCoursePage],
); );
if (data) {
data.showDownloadButton = data.showDownloadButton ?? true;
}
return data;
} }
/** /**