Merge pull request #1746 from dpalou/MOBILE-2844
MOBILE-2844 assign: Fix prefetch error if grader was -1main
commit
688d7a246c
|
@ -392,7 +392,7 @@ export class AddonModAssignPrefetchHandler extends CoreCourseActivityPrefetchHan
|
||||||
// Prefetch feedback.
|
// Prefetch feedback.
|
||||||
if (submission.feedback) {
|
if (submission.feedback) {
|
||||||
// Get profile and image of the grader.
|
// 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);
|
userIds.push(submission.feedback.grade.grader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -397,7 +397,7 @@ export class CoreUserProvider {
|
||||||
userId = Number(userId); // Make sure it's a number.
|
userId = Number(userId); // Make sure it's a number.
|
||||||
|
|
||||||
// Prevent repeats and errors.
|
// Prevent repeats and errors.
|
||||||
if (!isNaN(userId) && !treated[userId]) {
|
if (!isNaN(userId) && !treated[userId] && userId > 0) {
|
||||||
treated[userId] = true;
|
treated[userId] = true;
|
||||||
|
|
||||||
promises.push(this.getProfile(userId, courseId, false, siteId).then((profile) => {
|
promises.push(this.getProfile(userId, courseId, false, siteId).then((profile) => {
|
||||||
|
|
Loading…
Reference in New Issue