MOBILE-2795 assign: Fix fetching grades when assingment has no submissions
parent
8ae36fc8f4
commit
c8b3501339
|
@ -269,6 +269,11 @@ export class AddonModAssignProvider {
|
||||||
return assignment.grades;
|
return assignment.grades;
|
||||||
}
|
}
|
||||||
} else if (response.warnings && response.warnings.length) {
|
} else if (response.warnings && response.warnings.length) {
|
||||||
|
if (response.warnings[0].warningcode == 3) {
|
||||||
|
// No grades found.
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
return Promise.reject(response.warnings[0]);
|
return Promise.reject(response.warnings[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue