Index: lams_central/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r46690f9897a1d36d9ed0314876d309948ed0adea -r0f295260a6f4f68d391ed74f3a7967fbf841af90 --- lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 46690f9897a1d36d9ed0314876d309948ed0adea) +++ lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 0f295260a6f4f68d391ed74f3a7967fbf841af90) @@ -279,6 +279,7 @@ label.questions.choice.type.mr = Multiple response label.questions.choice.type.fb = Fill-in-Blank label.questions.choice.type.es = Essay +label.questions.choice.type.mh = Mark hedging label.questions.choice.type.unknown = Unknown error.lesson.not.accessible.for.learners = Sorry, this lesson is now disabled/archived. Contact your instructor for further details. button.add.now = Add now Index: lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateController.java =================================================================== diff -u -r71ecf7fae19f2c5bb42f613c3a72b062b145767e -r0f295260a6f4f68d391ed74f3a7967fbf841af90 --- lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateController.java (.../LdTemplateController.java) (revision 71ecf7fae19f2c5bb42f613c3a72b062b145767e) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateController.java (.../LdTemplateController.java) (revision 0f295260a6f4f68d391ed74f3a7967fbf841af90) @@ -1410,6 +1410,7 @@ assessments.add(assessment); boolean isMultipleChoice = Question.QUESTION_TYPE_MULTIPLE_CHOICE.equals(question.getType()); + boolean isMarkHedging = Question.QUESTION_TYPE_MARK_HEDGING.equals(question.getType()); boolean isMultipleResponse = Question.QUESTION_TYPE_MULTIPLE_RESPONSE.equals(question.getType()); Integer defaultGrade = question.getScore(); @@ -1418,8 +1419,8 @@ assessment.setTitle(question.getTitle()); assessment.setUuid(question.getQbUUID()); - if (isMultipleChoice) { - assessment.setType(QbQuestion.TYPE_MULTIPLE_CHOICE); + if (isMultipleChoice || isMarkHedging) { + assessment.setType(isMultipleChoice ? QbQuestion.TYPE_MULTIPLE_CHOICE : QbQuestion.TYPE_MARK_HEDGING); assessment.setMultipleAnswersAllowed(false); String correctAnswer = null; Index: lams_central/web/authoring/template/tbl/appexAssessment.jsp =================================================================== diff -u -r3686dbb13f68dc0fdea0ae95e0fae772942d2b62 -r0f295260a6f4f68d391ed74f3a7967fbf841af90 --- lams_central/web/authoring/template/tbl/appexAssessment.jsp (.../appexAssessment.jsp) (revision 3686dbb13f68dc0fdea0ae95e0fae772942d2b62) +++ lams_central/web/authoring/template/tbl/appexAssessment.jsp (.../appexAssessment.jsp) (revision 0f295260a6f4f68d391ed74f3a7967fbf841af90) @@ -80,7 +80,7 @@
  • + onClick="javascript:importQTI('appex${appexNumber}', 'mc,mr,mh,es', 'word')"> ...
  • Index: lams_central/web/questions/questionChoice.jsp =================================================================== diff -u -r3429d411007a3aa20a5366c4ad683bbd6666839a -r0f295260a6f4f68d391ed74f3a7967fbf841af90 --- lams_central/web/questions/questionChoice.jsp (.../questionChoice.jsp) (revision 3429d411007a3aa20a5366c4ad683bbd6666839a) +++ lams_central/web/questions/questionChoice.jsp (.../questionChoice.jsp) (revision 0f295260a6f4f68d391ed74f3a7967fbf841af90) @@ -102,7 +102,7 @@ answerDiv.toggle('slow'); } $('input', answerDiv).add(selector + 'feedback').add(selector + 'type').add(selector + 'text') - .add(selector + 'resourcesFolder') + .add(selector + 'score').add(selector + 'resourcesFolder') .attr('disabled', checked ? null : 'disabled'); if (checked) { @@ -204,6 +204,9 @@ () + + () + () @@ -221,6 +224,12 @@ + + + + <%-- Question feedback --%> <%-- Answer itself --%> - + ${answer.text}
    Index: lams_common/src/java/org/lamsfoundation/lams/questions/QuestionParser.java =================================================================== diff -u -r52f835246c157f47eed9df1d47f9e7bb0c16315d -r0f295260a6f4f68d391ed74f3a7967fbf841af90 --- lams_common/src/java/org/lamsfoundation/lams/questions/QuestionParser.java (.../QuestionParser.java) (revision 52f835246c157f47eed9df1d47f9e7bb0c16315d) +++ lams_common/src/java/org/lamsfoundation/lams/questions/QuestionParser.java (.../QuestionParser.java) (revision 0f295260a6f4f68d391ed74f3a7967fbf841af90) @@ -395,6 +395,10 @@ if (!StringUtils.isBlank(questionText)) { question.setText(questionText); } + String questionScore = request.getParameter("question" + questionIndex + "score"); + if (!StringUtils.isBlank(questionScore)) { + question.setScore(Integer.valueOf(questionScore)); + } String questionFeedback = request.getParameter("question" + questionIndex + "feedback"); // can be blank if (!StringUtils.isBlank(questionFeedback)) { Index: lams_common/src/java/org/lamsfoundation/lams/questions/QuestionWordParser.java =================================================================== diff -u -r71ecf7fae19f2c5bb42f613c3a72b062b145767e -r0f295260a6f4f68d391ed74f3a7967fbf841af90 --- lams_common/src/java/org/lamsfoundation/lams/questions/QuestionWordParser.java (.../QuestionWordParser.java) (revision 71ecf7fae19f2c5bb42f613c3a72b062b145767e) +++ lams_common/src/java/org/lamsfoundation/lams/questions/QuestionWordParser.java (.../QuestionWordParser.java) (revision 0f295260a6f4f68d391ed74f3a7967fbf841af90) @@ -66,6 +66,7 @@ private final static String CORRECT_TAG = "correct:"; private final static String INCORRECT_TAG = "incorrect:"; private final static String MARK_TAG = "mark:"; + private final static String MARK_HEDGING_TAG = "markhedging:"; private final static String FEEDBACK_TAG = "feedback:"; private final static String LEARNING_OUTCOME_TAG = "lo:"; private static final String CUSTOM_IMAGE_TAG_REGEX = "\\[IMAGE: .*?]"; @@ -146,6 +147,7 @@ String title = null; String description = null; String mark = null; + boolean isMarkHedging = false; String feedback = null; List answers = new ArrayList<>(); Answer correctVsaAnswer = null; @@ -254,6 +256,16 @@ continue; } + if (text.startsWith(MARK_HEDGING_TAG)) { + optionsStarted = true; + feedbackStarted = false; + + String markHedging = WebUtil.removeHTMLtags(text).replaceAll("(?i)" + MARK_HEDGING_TAG + "\\s*", "") + .strip(); + isMarkHedging = Boolean.valueOf(markHedging); + continue; + } + if (text.startsWith(FEEDBACK_TAG)) { optionsStarted = true; feedbackStarted = true; @@ -301,10 +313,28 @@ if (answerTagFound && (correctVsaAnswer != null || incorrectVsaAnswer != null)) { log.error( - "ANSWER tag found, but also CORRECT and/or INCORRECT tag found. Can not categorise the question as MCQ or VSA."); + "ANSWER tag found, but also CORRECT and/or INCORRECT tag found. Can not categorise the question as MCQ or VSA: " + + title); continue; } + if (isMarkHedging && (correctVsaAnswer != null || incorrectVsaAnswer != null)) { + log.error( + "MarkHedging tag found, but also CORRECT and/or INCORRECT tag found. Can not categorise the question as mark hedging or VSA. " + + title); + continue; + } + + if (isMarkHedging && answers.isEmpty()) { + log.error("MarkHedging tag found, but no answers were found in question: " + title); + continue; + } + + if (isMarkHedging && isMultipleResponse) { + log.error("MarkHedging question must only have one correct answer in question: " + title); + continue; + } + Question question = new Question(); if (correctVsaAnswer != null) { if (!QuestionParser.isQuestionTypeAcceptable(Question.QUESTION_TYPE_FILL_IN_BLANK, limitType, @@ -319,9 +349,13 @@ continue; } } else { - if (!QuestionParser - .isQuestionTypeAcceptable(isMultipleResponse ? Question.QUESTION_TYPE_MULTIPLE_RESPONSE - : Question.QUESTION_TYPE_MULTIPLE_CHOICE, limitType, question)) { + String type = Question.QUESTION_TYPE_MULTIPLE_CHOICE; + if (isMultipleResponse) { + type = Question.QUESTION_TYPE_MULTIPLE_RESPONSE; + } else if (isMarkHedging) { + type = Question.QUESTION_TYPE_MARK_HEDGING; + } + if (!QuestionParser.isQuestionTypeAcceptable(type, limitType, question)) { continue; } question.setAnswers(answers); Index: lams_www/web/public/MSWord-question-import.docx =================================================================== diff -u -reb1ac0cadda578e1883b23e66555ec5ce08eed26 -r0f295260a6f4f68d391ed74f3a7967fbf841af90 Binary files differ