MOBILE-3833 h5p: Fix Cannot access user attempts error on prefetch

main
Pau Ferrer Ocaña 2022-04-05 15:13:31 +02:00
parent 8f0c0bcfbb
commit 1f08ceba4a
1 changed files with 4 additions and 0 deletions

View File

@ -154,6 +154,10 @@ export class AddonModH5PActivityPrefetchHandlerService extends CoreCourseActivit
}; };
if (!accessInfo.canreviewattempts) { if (!accessInfo.canreviewattempts) {
if (!h5pActivity.enabletracking) {
return;
}
// Not a teacher, prefetch user attempts and the current user profile. // Not a teacher, prefetch user attempts and the current user profile.
const site = await CoreSites.getSite(siteId); const site = await CoreSites.getSite(siteId);