Index: lams_tool_assessment/web/pages/learning/learning.jsp =================================================================== diff -u -r67d7232f087b9f5c72ff41f7bbebe29cff81e099 -r9c3a64b840753192b333afb73c8fe7bdb54be638 --- lams_tool_assessment/web/pages/learning/learning.jsp (.../learning.jsp) (revision 67d7232f087b9f5c72ff41f7bbebe29cff81e099) +++ lams_tool_assessment/web/pages/learning/learning.jsp (.../learning.jsp) (revision 9c3a64b840753192b333afb73c8fe7bdb54be638) @@ -45,18 +45,18 @@ var questionIndex = $(this).data("question-index"); var selects = $("select[name^=question" + questionIndex + "_]"); - var grade = selects.length == 0 ? 0 : eval(selects.first().find('option:last-child').val()) + var maxMark = selects.length == 0 ? 0 : eval(selects.first().find('option:last-child').val()) var totalSelected = countHedgeQuestionSelectTotal(questionIndex); - var isButtonEnabled = (totalSelected == grade); + var isButtonEnabled = (totalSelected == maxMark); //check if hedging justification is enabled var justificationTextarea = $("#justification-question" + questionIndex); if( justificationTextarea.length) { isButtonEnabled = isButtonEnabled && $.trim(justificationTextarea.val()); } - //if totalSelected equals to question's grade - show button + //if totalSelected equals to question's maxMark - show button if (isButtonEnabled) { $("[type=button][name=submit-hedging-question" + questionIndex + "]").prop("disabled", "").removeClass("button-disabled"); } else { @@ -388,11 +388,11 @@ } } else { - var grade = ${question.grade}; + var maxMark = ${question.maxMark}; var totalSelected = countHedgeQuestionSelectTotal(questionIndex); - //if totalSelected not equals to question's grade OR textarea is empty or contains only white-space - show warning - if (totalSelected != grade) { + //if totalSelected not equals to question's maxMark OR textarea is empty or contains only white-space - show warning + if (totalSelected != maxMark) { markHedgingWrongTotalQuestions.push("${status.index}"); } if(${question.hedgingJustificationEnabled} && !$.trim($("#justification-question" + questionIndex).val())){