Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/AuthoringAction.java =================================================================== diff -u -r0faffe5afa6b1ff59a1cf550cfedaadfa7da7765 -r01dcdc170a8ba868c24d9503ef4662327f884a13 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision 0faffe5afa6b1ff59a1cf550cfedaadfa7da7765) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision 01dcdc170a8ba868c24d9503ef4662327f884a13) @@ -314,15 +314,6 @@ ToolAccessMode mode = getAccessMode(request); - ActionMessages errors = validate(assessmentForm, mapping, request); - if (!errors.isEmpty()) { - saveErrors(request, errors); - if (mode.isAuthor()) - return mapping.findForward("author"); - else - return mapping.findForward("monitor"); - } - Assessment assessment = assessmentForm.getAssessment(); IAssessmentService service = getAssessmentService(); @@ -444,10 +435,12 @@ assessmentForm.setAssessment(assessmentPO); request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, Boolean.TRUE); - if (mode.isAuthor()) + if (mode.isAuthor()) { return mapping.findForward("author"); - else + } + else { return mapping.findForward("monitor"); + } } /** @@ -847,9 +840,6 @@ AssessmentAnswerOption question = rList.remove(optionIndex); optionList.clear(); optionList.addAll(rList); -// // add to delList -// List delList = getDeletedQuestionList(sessionMap); -// delList.add(question); } request.setAttribute(AttributeNames.PARAM_CONTENT_FOLDER_ID, WebUtil.readStrParam(request, @@ -1303,9 +1293,7 @@ new AssessmentAnswerOptionComparator()); for (int i = 0; i < count; i++) { if ((questionType == AssessmentConstants.QUESTION_TYPE_MULTIPLE_CHOICE) - || (questionType == AssessmentConstants.QUESTION_TYPE_SHORT_ANSWER) - || (questionType == AssessmentConstants.QUESTION_TYPE_ORDERING)) { - + || (questionType == AssessmentConstants.QUESTION_TYPE_SHORT_ANSWER)) { String answerString = paramMap.get(AssessmentConstants.ATTR_OPTION_ANSWER_PREFIX + i); if ((answerString == null) && isForSaving) { continue; @@ -1352,6 +1340,17 @@ option.setGrade(grade); option.setFeedback((String) paramMap.get(AssessmentConstants.ATTR_OPTION_FEEDBACK_PREFIX + i)); optionList.add(option); + } else if (questionType == AssessmentConstants.QUESTION_TYPE_ORDERING) { + String answerString = paramMap.get(AssessmentConstants.ATTR_OPTION_ANSWER_PREFIX + i); + if ((answerString == null) && isForSaving) { + continue; + } + + AssessmentAnswerOption option = new AssessmentAnswerOption(); + String sequenceId = paramMap.get(AssessmentConstants.ATTR_OPTION_SEQUENCE_ID_PREFIX + i); + option.setSequenceId(NumberUtils.stringToInt(sequenceId)); + option.setAnswerString(answerString); + optionList.add(option); } } return optionList; @@ -1476,24 +1475,4 @@ } return paramMap; } - - - private ActionMessages validate(AssessmentForm assessmentForm, ActionMapping mapping, HttpServletRequest request) { - ActionMessages errors = new ActionMessages(); - // if (StringUtils.isBlank(assessmentForm.getAssessment().getTitle())) { - // ActionMessage error = new ActionMessage("error.resource.question.title.blank"); - // errors.add(ActionMessages.GLOBAL_MESSAGE, error); - // } - - // define it later mode(TEACHER) skip below validation. - String modeStr = request.getParameter(AttributeNames.ATTR_MODE); - if (StringUtils.equals(modeStr, ToolAccessMode.TEACHER.toString())) { - return errors; - } - - // Some other validation outside basic Tab. - - return errors; - } - } Index: lams_tool_assessment/web/includes/javascript/assessmentoption.js =================================================================== diff -u -r596580465b9d0c2c7c50f9a1c42ca4ce6a91b523 -r01dcdc170a8ba868c24d9503ef4662327f884a13 --- lams_tool_assessment/web/includes/javascript/assessmentoption.js (.../assessmentoption.js) (revision 596580465b9d0c2c7c50f9a1c42ca4ce6a91b523) +++ lams_tool_assessment/web/includes/javascript/assessmentoption.js (.../assessmentoption.js) (revision 01dcdc170a8ba868c24d9503ef4662327f884a13) @@ -65,7 +65,7 @@ ); } function prepareFCKEditorsForAjaxSubmit(){ - if ((questionType == 1) || (questionType == 3)) { + if ((questionType == 1) || (questionType == 3) || (questionType == 7)) { $("[name^=optionAnswer]").each(function() { this.value = FCKeditorAPI.GetInstance(this.name).GetXHTML(); }); Index: lams_tool_assessment/web/pages/authoring/parts/addordering.jsp =================================================================== diff -u -r0faffe5afa6b1ff59a1cf550cfedaadfa7da7765 -r01dcdc170a8ba868c24d9503ef4662327f884a13 --- lams_tool_assessment/web/pages/authoring/parts/addordering.jsp (.../addordering.jsp) (revision 0faffe5afa6b1ff59a1cf550cfedaadfa7da7765) +++ lams_tool_assessment/web/pages/authoring/parts/addordering.jsp (.../addordering.jsp) (revision 01dcdc170a8ba868c24d9503ef4662327f884a13) @@ -47,11 +47,6 @@ }); return $("input[name^=optionAnswer]:filled").length < 1; } - }, - hasOneHundredGrade: { - required: function(element) { - return $("select[name^='optionGrade'][value='100.0']").length < 1; - } } }, messages: { @@ -66,9 +61,6 @@ }, hasAnswerFilled: { required: "" - }, - hasOneHundredGrade: { - required: "
" } }, invalidHandler: function(form, validator) { @@ -174,7 +166,6 @@ - Fisheye: Tag 01dcdc170a8ba868c24d9503ef4662327f884a13 refers to a dead (removed) revision in file `lams_tool_assessment/web/pages/authoring/parts/matchingpair.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_assessment/web/pages/authoring/parts/matchingpairoption.jsp =================================================================== diff -u --- lams_tool_assessment/web/pages/authoring/parts/matchingpairoption.jsp (revision 0) +++ lams_tool_assessment/web/pages/authoring/parts/matchingpairoption.jsp (revision 01dcdc170a8ba868c24d9503ef4662327f884a13) @@ -0,0 +1,31 @@ + + + + + + + + + + + + + +
+ + + + ${status.index+1} + +
+ + +
+ + + +
+ +
\ No newline at end of file Fisheye: Tag 01dcdc170a8ba868c24d9503ef4662327f884a13 refers to a dead (removed) revision in file `lams_tool_assessment/web/pages/authoring/parts/numerical.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_assessment/web/pages/authoring/parts/numericaloption.jsp =================================================================== diff -u --- lams_tool_assessment/web/pages/authoring/parts/numericaloption.jsp (revision 0) +++ lams_tool_assessment/web/pages/authoring/parts/numericaloption.jsp (revision 01dcdc170a8ba868c24d9503ef4662327f884a13) @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + + + ${status.index+1} + + + +
+ + + + + +
+ + + + + + 100 % + 90 % + 83.333 % + 80 % + 75% + 70 % + 66.666 % + 60 % + 50 % + 40 % + 33.333 % + 30 % + 25 % + 20 % + 16.666 % + 14.2857 % + 12.5 % + 11.111 % + 10 % + 5 % + + -5 % + -10 % + -11.111 % + -12.5 % + -14.2857 % + -16.666 % + -20 % + -25 % + -30 % + -33.333 % + -40 % + -50 % + -60 % + -66.666 % + -70 % + -75 % + -80 % + -83.333 % + -90 % + -100 % + +
+ + + +
+ + +
Index: lams_tool_assessment/web/pages/authoring/parts/optionlist.jsp =================================================================== diff -u -r24ffa43545be19c176ebcc4cc16286e59dbf1306 -r01dcdc170a8ba868c24d9503ef4662327f884a13 --- lams_tool_assessment/web/pages/authoring/parts/optionlist.jsp (.../optionlist.jsp) (revision 24ffa43545be19c176ebcc4cc16286e59dbf1306) +++ lams_tool_assessment/web/pages/authoring/parts/optionlist.jsp (.../optionlist.jsp) (revision 01dcdc170a8ba868c24d9503ef4662327f884a13) @@ -8,15 +8,18 @@ - + <%@ include file="option.jsp"%> - <%@ include file="matchingpair.jsp"%> + <%@ include file="matchingpairoption.jsp"%> - <%@ include file="numerical.jsp"%> - + <%@ include file="numericaloption.jsp"%> + + + <%@ include file="orderingoption.jsp"%> + Index: lams_tool_assessment/web/pages/authoring/parts/orderingoption.jsp =================================================================== diff -u --- lams_tool_assessment/web/pages/authoring/parts/orderingoption.jsp (revision 0) +++ lams_tool_assessment/web/pages/authoring/parts/orderingoption.jsp (revision 01dcdc170a8ba868c24d9503ef4662327f884a13) @@ -0,0 +1,18 @@ + + + + + + + +
+ + + + ${status.index+1} + +
+ + +