MOBILE-3523 essay: Fix offline status when required attachments

main
Dani Palou 2020-11-24 14:28:09 +01:00
parent bc7602abcd
commit 289fcd599b
1 changed files with 2 additions and 2 deletions

View File

@ -165,8 +165,8 @@ export class AddonQtypeEssayHandler implements CoreQuestionHandler {
return attachments && attachments.length >= Number(question.settings.attachmentsrequired) ? 1 : 0;
}
return (hasTextAnswer || question.settings.responserequired == '0') &&
(attachments && attachments.length > Number(question.settings.attachmentsrequired)) ? 1 : 0;
return ((hasTextAnswer || question.settings.responserequired == '0') &&
(attachments && attachments.length >= Number(question.settings.attachmentsrequired))) ? 1 : 0;
}
/**