MOBILE-2915 workshop: Fix asssessment prefetch
parent
5602e6eeb4
commit
e272a39636
|
@ -332,17 +332,14 @@ export class AddonModWorkshopPrefetchHandler extends CoreCourseActivityPrefetchH
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (assessments.length > 0) {
|
reportPromise = reportPromise.finally(() => {
|
||||||
reportPromise = reportPromise.finally(() => {
|
if (assessments.length > 0) {
|
||||||
const promises3 = [];
|
return Promise.all(assessments.map((assessment, id) => {
|
||||||
assessments.forEach((assessment, id) => {
|
return this.workshopProvider.getAssessmentForm(workshop.id, id, undefined, undefined, undefined,
|
||||||
promises3.push(this.workshopProvider.getAssessmentForm(workshop.id, id, undefined, undefined,
|
siteId);
|
||||||
undefined, siteId));
|
}));
|
||||||
});
|
}
|
||||||
|
});
|
||||||
return Promise.all(promises3);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
promises2.push(reportPromise);
|
promises2.push(reportPromise);
|
||||||
|
|
||||||
if (workshop.phase == AddonModWorkshopProvider.PHASE_CLOSED) {
|
if (workshop.phase == AddonModWorkshopProvider.PHASE_CLOSED) {
|
||||||
|
|
Loading…
Reference in New Issue