From a66868340919c88516bb6a3367f48505c8dcda5e Mon Sep 17 00:00:00 2001 From: Olle Haerstedt Date: Thu, 8 Feb 2018 14:17:43 +0100 Subject: [PATCH] Fixed issue #13315: Make it possible to submit mandatory multiple choice with empty comment --- assets/scripts/multiplechoice_withcomments.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/scripts/multiplechoice_withcomments.js b/assets/scripts/multiplechoice_withcomments.js index 88946f1106d..366fff9edf4 100644 --- a/assets/scripts/multiplechoice_withcomments.js +++ b/assets/scripts/multiplechoice_withcomments.js @@ -18,7 +18,8 @@ var doMultipleChoiceWithComments = function(qID,when) question.on('keyup focusout',':not(.other-item) input:text',function(event){ var checkboxinput=$("#answer"+$(this)[0].name.replace("comment","")); if($(this)[0].value==""){ - checkboxinput[0].checked=false; + // Do nothing in this case - if the question is mandatory, it should still be possible to + // submit a checked box without a comment. }else{ checkboxinput[0].checked=true; }