Index: lams_tool_assessment/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -rc56857991e269aa7f5bd250a05b52c767a9957ad -ra3e987093464232bfb4536f3335acc9851291b95 --- lams_tool_assessment/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision c56857991e269aa7f5bd250a05b52c767a9957ad) +++ lams_tool_assessment/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision a3e987093464232bfb4536f3335acc9851291b95) @@ -55,6 +55,12 @@ label.authoring.basic.resource.description.input =Description label.authoring.basic.resource.zip.file.input =Zip file: label.authoring.basic.none =None +label.authoring.choice.add.choice =Add Choice +label.authoring.choice.field.required =This field is required. +label.authoring.choice.enter.integer =Please enter an integer. +label.authoring.choice.enter.float =Please enter a float. +label.authoring.choice.answer.options =You should provide at least 2 answer options. + label.authoring.online.file =Upload online file label.authoring.offline.file =Upload offline file label.authoring.choosefile.button =Choose file Index: lams_tool_assessment/conf/xdoclet/struts-actions.xml =================================================================== diff -u -rc56857991e269aa7f5bd250a05b52c767a9957ad -ra3e987093464232bfb4536f3335acc9851291b95 --- lams_tool_assessment/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision c56857991e269aa7f5bd250a05b52c767a9957ad) +++ lams_tool_assessment/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision a3e987093464232bfb4536f3335acc9851291b95) @@ -84,7 +84,6 @@ - @@ -99,7 +98,6 @@ - @@ -114,7 +112,6 @@ - Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/AssessmentConstants.java =================================================================== diff -u -rc56857991e269aa7f5bd250a05b52c767a9957ad -ra3e987093464232bfb4536f3335acc9851291b95 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/AssessmentConstants.java (.../AssessmentConstants.java) (revision c56857991e269aa7f5bd250a05b52c767a9957ad) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/AssessmentConstants.java (.../AssessmentConstants.java) (revision a3e987093464232bfb4536f3335acc9851291b95) @@ -42,16 +42,14 @@ public static final short QUESTION_TYPE_MULTIPLE_CHOICE = 2; public static final short QUESTION_TYPE_MATCHING_PAIRS = 3; - - public static final short QUESTION_TYPE_FILL_THE_GAP = 4; - public static final short QUESTION_TYPE_SHORT_ANSWER = 5; + public static final short QUESTION_TYPE_SHORT_ANSWER = 4; - public static final short QUESTION_TYPE_NUMERICAL = 6; + public static final short QUESTION_TYPE_NUMERICAL = 5; - public static final short QUESTION_TYPE_TRUE_FALSE = 7; + public static final short QUESTION_TYPE_TRUE_FALSE = 6; - public static final short QUESTION_TYPE_ESSAY = 8; + public static final short QUESTION_TYPE_ESSAY = 7; // for action forward name public static final String SUCCESS = "success"; Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/AuthoringAction.java =================================================================== diff -u -rc56857991e269aa7f5bd250a05b52c767a9957ad -ra3e987093464232bfb4536f3335acc9851291b95 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision c56857991e269aa7f5bd250a05b52c767a9957ad) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision a3e987093464232bfb4536f3335acc9851291b95) @@ -683,13 +683,13 @@ Set optionList = getOptionsFromRequest(request, true); AssessmentQuestionForm questionForm = (AssessmentQuestionForm) form; - ActionErrors errors = validateAssessmentQuestion(questionForm, optionList); + ActionErrors errors = new ActionErrors();//validateAssessmentQuestion(questionForm, optionList); - if (!errors.isEmpty()) { - this.addErrors(request, errors); - request.setAttribute(AssessmentConstants.ATTR_OPTION_LIST, optionList); - return findForward(questionForm.getQuestionType(), mapping); - } +// if (!errors.isEmpty()) { +// this.addErrors(request, errors); +// request.setAttribute(AssessmentConstants.ATTR_OPTION_LIST, optionList); +// return findForward(questionForm.getQuestionType(), mapping); +// } try { extractFormToAssessmentQuestion(request, questionForm, optionList); @@ -1070,9 +1070,6 @@ case AssessmentConstants.QUESTION_TYPE_MATCHING_PAIRS: forward = mapping.findForward("matchingpairs"); break; - case AssessmentConstants.QUESTION_TYPE_FILL_THE_GAP: - forward = mapping.findForward("fillthegap"); - break; case AssessmentConstants.QUESTION_TYPE_SHORT_ANSWER: forward = mapping.findForward("shortanswer"); break; @@ -1188,42 +1185,42 @@ } - /** - * Vaidate assessment question regards to their type (url/file/learning object/website zip file) - * - * @param questionForm - * @return - */ - private ActionErrors validateAssessmentQuestion(AssessmentQuestionForm questionForm, Set optionList) { - ActionErrors errors = new ActionErrors(); - if (StringUtils.isBlank(questionForm.getTitle())) { - errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(AssessmentConstants.ERROR_MSG_QUESTION_NAME_BLANK)); - } - if (StringUtils.isBlank(questionForm.getQuestion())) { - errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(AssessmentConstants.ERROR_MSG_QUESTION_TEXT_BLANK)); - } - - if (questionForm.getQuestionType() == AssessmentConstants.QUESTION_TYPE_CHOICE) { - /* Checks if entered value is integer. */ - try { - Integer.parseInt(questionForm.getDefaultGrade()); - } catch (NumberFormatException nfe) { - errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage( - AssessmentConstants.ERROR_MSG_DEFAULT_GRADE_WRONG_FORMAT)); - } - try { - Float.parseFloat(questionForm.getPenaltyFactor()); - } catch (NumberFormatException nfe) { - errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage( - AssessmentConstants.ERROR_MSG_PENALTY_FACTOR_WRONG_FORMAT)); - } - - if (optionList.size() < 2) { - errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(AssessmentConstants.ERROR_MSG_NOT_ENOUGH_OPTIONS)); - } - } - return errors; - } +// /** +// * Vaidate assessment question regards to their type (url/file/learning object/website zip file) +// * +// * @param questionForm +// * @return +// */ +// private ActionErrors validateAssessmentQuestion(AssessmentQuestionForm questionForm, Set optionList) { +// ActionErrors errors = new ActionErrors(); +// if (StringUtils.isBlank(questionForm.getTitle())) { +// errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(AssessmentConstants.ERROR_MSG_QUESTION_NAME_BLANK)); +// } +//// if (StringUtils.isBlank(questionForm.getQuestion())) { +//// errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(AssessmentConstants.ERROR_MSG_QUESTION_TEXT_BLANK)); +//// } +// +// if (questionForm.getQuestionType() == AssessmentConstants.QUESTION_TYPE_CHOICE) { +// /* Checks if entered value is integer. */ +// try { +// Integer.parseInt(questionForm.getDefaultGrade()); +// } catch (NumberFormatException nfe) { +// errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage( +// AssessmentConstants.ERROR_MSG_DEFAULT_GRADE_WRONG_FORMAT)); +// } +// try { +// Float.parseFloat(questionForm.getPenaltyFactor()); +// } catch (NumberFormatException nfe) { +// errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage( +// AssessmentConstants.ERROR_MSG_PENALTY_FACTOR_WRONG_FORMAT)); +// } +// +// if (optionList.size() < 2) { +// errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(AssessmentConstants.ERROR_MSG_NOT_ENOUGH_OPTIONS)); +// } +// } +// return errors; +// } /** * Get ToolAccessMode from HttpRequest parameters. Default value is AUTHOR mode. Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/LearningAction.java =================================================================== diff -u -rc56857991e269aa7f5bd250a05b52c767a9957ad -ra3e987093464232bfb4536f3335acc9851291b95 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/LearningAction.java (.../LearningAction.java) (revision c56857991e269aa7f5bd250a05b52c767a9957ad) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/LearningAction.java (.../LearningAction.java) (revision a3e987093464232bfb4536f3335acc9851291b95) @@ -595,9 +595,6 @@ case AssessmentConstants.QUESTION_TYPE_MATCHING_PAIRS: forward = mapping.findForward("website"); break; - case AssessmentConstants.QUESTION_TYPE_FILL_THE_GAP: - forward = mapping.findForward("learningobject"); - break; default: forward = null; break; @@ -656,10 +653,10 @@ // if(StringUtils.isBlank(questionForm.getDescription())) // errors.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(AssessmentConstants.ERROR_MSG_DESC_BLANK)); // } - if (questionForm.getQuestionType() == AssessmentConstants.QUESTION_TYPE_MATCHING_PAIRS - || questionForm.getQuestionType() == AssessmentConstants.QUESTION_TYPE_FILL_THE_GAP - || questionForm.getQuestionType() == AssessmentConstants.QUESTION_TYPE_MULTIPLE_CHOICE) { - +// if (questionForm.getQuestionType() == AssessmentConstants.QUESTION_TYPE_MATCHING_PAIRS +// || questionForm.getQuestionType() == AssessmentConstants.QUESTION_TYPE_FILL_THE_GAP +// || questionForm.getQuestionType() == AssessmentConstants.QUESTION_TYPE_MULTIPLE_CHOICE) { +// // if (questionForm.getFile() != null && FileUtil.isExecutableFile(questionForm.getFile().getFileName())) { // ActionMessage msg = new ActionMessage("error.attachment.executable"); // errors.add(ActionMessages.GLOBAL_MESSAGE, msg); @@ -673,7 +670,7 @@ // && (questionForm.getFile() == null || StringUtils.isEmpty(questionForm.getFile().getFileName()))) { // errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(AssessmentConstants.ERROR_MSG_FILE_BLANK)); // } - } +// } return errors; } Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/servlet/ExportServlet.java =================================================================== diff -u -rc56857991e269aa7f5bd250a05b52c767a9957ad -ra3e987093464232bfb4536f3335acc9851291b95 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/servlet/ExportServlet.java (.../ExportServlet.java) (revision c56857991e269aa7f5bd250a05b52c767a9957ad) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/servlet/ExportServlet.java (.../ExportServlet.java) (revision a3e987093464232bfb4536f3335acc9851291b95) @@ -230,9 +230,9 @@ handler = getToolContentHandler(); for (Summary summary : list) { // for learning object, it just display "No offlice pakcage avaliable" information. - if (summary.getQuestionType() == AssessmentConstants.QUESTION_TYPE_FILL_THE_GAP - || summary.getQuestionType() == AssessmentConstants.QUESTION_TYPE_CHOICE) - continue; +// if (summary.getQuestionType() == AssessmentConstants.QUESTION_TYPE_FILL_THE_GAP +// || summary.getQuestionType() == AssessmentConstants.QUESTION_TYPE_CHOICE) +// continue; try { int idx = 1; String userName = summary.getUsername(); Index: lams_tool_assessment/web/includes/images/req.gif =================================================================== diff -u Binary files differ Index: lams_tool_assessment/web/pages/authoring/basic.jsp =================================================================== diff -u -rc56857991e269aa7f5bd250a05b52c767a9957ad -ra3e987093464232bfb4536f3335acc9851291b95 --- lams_tool_assessment/web/pages/authoring/basic.jsp (.../basic.jsp) (revision c56857991e269aa7f5bd250a05b52c767a9957ad) +++ lams_tool_assessment/web/pages/authoring/basic.jsp (.../basic.jsp) (revision a3e987093464232bfb4536f3335acc9851291b95) @@ -3,7 +3,7 @@ - + + + + + + - - - - - - + } + --> @@ -53,7 +92,7 @@ <%@ include file="/common/messages.jsp"%> - + @@ -65,21 +104,24 @@
+ Required field
- * +
- * +
+ Required field
- +
+ Required field
@@ -88,25 +130,23 @@ -