MOBILE-2688 workshop: Fix bug on prefetch

main
Pau Ferrer Ocaña 2018-11-08 12:29:15 +01:00
parent 973bc5fcb3
commit ed9dd1bba0
1 changed files with 3 additions and 3 deletions

View File

@ -224,9 +224,9 @@ export class AddonModWorkshopPrefetchHandler extends CoreCourseActivityPrefetchH
* @param {number} workshopId Workshop ID.
* @param {any[]} groups Array of groups in the activity.
* @param {string} siteId Site ID. If not defined, current site.
* @return {Promise<any>} All unique entries.
* @return {Promise<any[]>} All unique entries.
*/
protected getAllGradesReport(workshopId: number, groups: any[], siteId: string): Promise<any> {
protected getAllGradesReport(workshopId: number, groups: any[], siteId: string): Promise<any[]> {
const promises = [];
groups.forEach((group) => {
@ -245,7 +245,7 @@ export class AddonModWorkshopPrefetchHandler extends CoreCourseActivityPrefetchH
});
});
return uniqueGrades;
return this.utils.objectToArray(uniqueGrades);
});
}