Skip to content

Commit 3921221

Browse files
committed
MOBILE-1600 quiz: Ignore get review failures in prefetch
1 parent 13d3bf0 commit 3921221

File tree

1 file changed

+5
-1
lines changed
  • www/addons/mod/quiz/services

1 file changed

+5
-1
lines changed

www/addons/mod/quiz/services/quiz.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,9 @@ angular.module('mm.addons.mod_quiz')
22642264
}
22652265

22662266
angular.forEach(pages, function(page) {
2267-
promises.push(self.getAttemptReview(attempt.id, page, true, siteId));
2267+
promises.push(self.getAttemptReview(attempt.id, page, true, siteId).catch(function() {
2268+
// Ignore failures, maybe the user can't review the attempt.
2269+
}));
22682270
});
22692271
// All questions in same page.
22702272
promises.push(self.getAttemptReview(attempt.id, -1, true, siteId).then(function(data) {
@@ -2274,6 +2276,8 @@ angular.module('mm.addons.mod_quiz')
22742276
questionPromises.push($mmQuestionHelper.prefetchQuestionFiles(question, siteId));
22752277
});
22762278
return $q.all(questionPromises);
2279+
}, function() {
2280+
// Ignore failures, maybe the user can't review the attempt.
22772281
}));
22782282
} else {
22792283

0 commit comments

Comments
 (0)