Commit a8051fb1 by Matjaz Gregoric

Keep submit button disabled after answering in assessment.

Once a student submits an answer in assessment mode, he should not be allowed
to change it, so stop listening for changes once an answer has been submitted.

The change lister would re-enable the submit button if the student changed their
answer, which shouldn't happen in assessment mode.
parent 6337be4a
...@@ -112,8 +112,13 @@ function MentoringAssessmentView(runtime, element, mentoring) { ...@@ -112,8 +112,13 @@ function MentoringAssessmentView(runtime, element, mentoring) {
} }
function onChange() { function onChange() {
// Assessment mode does not allow to modify answers.
// Once an answer has been submitted (next button is enabled),
// start ignoring changes to the answer.
if (nextDOM.attr('disabled')) {
validateXBlock(); validateXBlock();
} }
}
function handleSubmitResults(result) { function handleSubmitResults(result) {
$('.grade', element).data('score', result.score); $('.grade', element).data('score', result.score);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment