Merge pull request #1709 from albertgasset/MOBILE-2795

MOBILE-2795 assign: Fix fetching grades when assingment has no submis…
main
Juan Leyva 2019-01-08 12:45:31 +01:00 committed by GitHub
commit 4c23e7e863
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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]);
} }