set allowed_attempts=1 when multiple attempts is unchecked, fixes #2525
Change-Id: I3b783efcfbeaa0360870da66edaaf7fb2677ba57 Reviewed-on: https://gerrit.instructure.com/2297 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Brian Whitmer <brian@instructure.com>
This commit is contained in:
parent
e0a163d297
commit
564866d0e4
|
@ -977,12 +977,13 @@ var quiz = {};
|
|||
delete data['activate'];
|
||||
}
|
||||
data['quiz[description]'] = $("#quiz_description").editorBox('get_code'); //val();
|
||||
var attempts = 1;
|
||||
if(data.multiple_attempts) {
|
||||
attempts = parseInt(data.allowed_attempts, 10);
|
||||
if(isNaN(attempts) || !data.limit_attempts) { attempts = -1; }
|
||||
data.allowed_attempts = attempts;
|
||||
data['quiz[allowed_attempts]'] = attempts;
|
||||
}
|
||||
data.allowed_attempts = attempts;
|
||||
data['quiz[allowed_attempts]'] = attempts;
|
||||
return data;
|
||||
},
|
||||
beforeSubmit: function(data) {
|
||||
|
|
Loading…
Reference in New Issue