MOBILE-3833 storage: Show download buttons on downloadable modules
parent
2ac0a02fee
commit
8f0c0bcfbb
|
@ -299,11 +299,17 @@ export class CoreCourseModuleDelegateService extends CoreDelegate<CoreCourseModu
|
|||
sectionId?: number,
|
||||
forCoursePage?: boolean,
|
||||
): Promise<CoreCourseModuleHandlerData | undefined> {
|
||||
return await this.executeFunctionOnEnabled<CoreCourseModuleHandlerData>(
|
||||
const data = await this.executeFunctionOnEnabled<CoreCourseModuleHandlerData>(
|
||||
modname,
|
||||
'getData',
|
||||
[module, courseId, sectionId, forCoursePage],
|
||||
);
|
||||
|
||||
if (data) {
|
||||
data.showDownloadButton = data.showDownloadButton ?? true;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue