Skip to content

Commit bc7602a

Browse files
committed
MOBILE-3523 essay: Fix attachments in quiz submitted offline
1 parent 185ed17 commit bc7602a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/addon/mod/quiz/pages/player/player.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,13 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy {
583583
*/
584584
protected processAttempt(userFinish?: boolean, timeUp?: boolean, retrying?: boolean): Promise<any> {
585585
// Get the answers to send.
586-
return this.prepareAnswers().then((answers) => {
586+
let promise = Promise.resolve({});
587+
588+
if (!this.showSummary) {
589+
promise = this.prepareAnswers();
590+
}
591+
592+
return promise.then((answers) => {
587593
// Send the answers.
588594
return this.quizProvider.processAttempt(this.quiz, this.attempt, answers, this.preflightData, userFinish, timeUp,
589595
this.offline).catch((error) => {

0 commit comments

Comments
 (0)