From 289fcd599bb887aa9648e050864acb933782813b Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 24 Nov 2020 14:28:09 +0100 Subject: [PATCH] MOBILE-3523 essay: Fix offline status when required attachments --- src/addon/qtype/essay/providers/handler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/addon/qtype/essay/providers/handler.ts b/src/addon/qtype/essay/providers/handler.ts index 527b8505f..54c45ebd0 100644 --- a/src/addon/qtype/essay/providers/handler.ts +++ b/src/addon/qtype/essay/providers/handler.ts @@ -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; } /**