MOBILE-2915 assign: Fix prefetch for teachers

main
Albert Gasset 2019-03-28 11:31:42 +01:00
parent 757b1b1bc3
commit d3ff082454
1 changed files with 5 additions and 1 deletions

View File

@ -379,9 +379,13 @@ export class AddonModAssignProvider {
*
* @param {any} assign Assign.
* @param {any} attempt Attempt.
* @return {any} Submission object.
* @return {any} Submission object or null.
*/
getSubmissionObjectFromAttempt(assign: any, attempt: any): any {
if (!attempt) {
return null;
}
return assign.teamsubmission ? attempt.teamsubmission : attempt.submission;
}