diff --git a/src/addon/mod/assign/providers/prefetch-handler.ts b/src/addon/mod/assign/providers/prefetch-handler.ts index d7a86836a..93ecb3f68 100644 --- a/src/addon/mod/assign/providers/prefetch-handler.ts +++ b/src/addon/mod/assign/providers/prefetch-handler.ts @@ -392,7 +392,7 @@ export class AddonModAssignPrefetchHandler extends CoreCourseActivityPrefetchHan // Prefetch feedback. if (submission.feedback) { // Get profile and image of the grader. - if (submission.feedback.grade && submission.feedback.grade.grader) { + if (submission.feedback.grade && submission.feedback.grade.grader && submission.feedback.grade.grader != -1) { userIds.push(submission.feedback.grade.grader); } diff --git a/src/core/user/providers/user.ts b/src/core/user/providers/user.ts index 2a4d83d47..242c586d6 100644 --- a/src/core/user/providers/user.ts +++ b/src/core/user/providers/user.ts @@ -397,7 +397,7 @@ export class CoreUserProvider { userId = Number(userId); // Make sure it's a number. // Prevent repeats and errors. - if (!isNaN(userId) && !treated[userId]) { + if (!isNaN(userId) && !treated[userId] && userId > 0) { treated[userId] = true; promises.push(this.getProfile(userId, courseId, false, siteId).then((profile) => {