Index: lams_tool_assessment/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -rc18a564ab91e850651bed4ba9e4b648d3cc7cf62 -r1d6afb88d2e239ea9e5c7ba3c6a3f5735c96a2e1 --- lams_tool_assessment/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision c18a564ab91e850651bed4ba9e4b648d3cc7cf62) +++ lams_tool_assessment/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 1d6afb88d2e239ea9e5c7ba3c6a3f5735c96a2e1) @@ -360,6 +360,8 @@ admin.return = Return to maintain LAMS admin.button.save = Save admin.hide.titles = Hide question titles for learners +label.vsa.allocate.button = Allocate VSAs +label.vsa.allocate.description = Allocate students' answers by dragging and dropping them to correct options label.answer.queue = Answer queue label.drag.and.drop = drag and drop answer to tick or cross label.correct = Correct Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/MonitoringController.java =================================================================== diff -u -re194f22014c7cbffaf5168f1982aa89e7c34c34d -r1d6afb88d2e239ea9e5c7ba3c6a3f5735c96a2e1 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/MonitoringController.java (.../MonitoringController.java) (revision e194f22014c7cbffaf5168f1982aa89e7c34c34d) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/MonitoringController.java (.../MonitoringController.java) (revision 1d6afb88d2e239ea9e5c7ba3c6a3f5735c96a2e1) @@ -206,20 +206,26 @@ // display student choices only if all questions are multiple choice boolean displayStudentChoices = true; + boolean vsaPresent = false; int maxOptionsInQuestion = 0; for (AssessmentQuestion question : assessment.getQuestions()) { - if (question.getType() == QbQuestion.TYPE_MULTIPLE_CHOICE) { + if (displayStudentChoices && question.getType() == QbQuestion.TYPE_MULTIPLE_CHOICE) { int optionsInQuestion = question.getQbQuestion().getQbOptions().size(); if (optionsInQuestion > maxOptionsInQuestion) { maxOptionsInQuestion = optionsInQuestion; } } else { displayStudentChoices = false; - break; } + + if (question.getType() == QbQuestion.TYPE_VERY_SHORT_ANSWERS) { + vsaPresent = true; + } } + request.setAttribute("vsaPresent", vsaPresent); + request.setAttribute("displayStudentChoices", displayStudentChoices); if (displayStudentChoices) { request.setAttribute("maxOptionsInQuestion", maxOptionsInQuestion); @@ -301,6 +307,25 @@ return "pages/monitoring/parts/questionsummary"; } + @RequestMapping("/displayVsaAllocate") + public String displayVsaAllocate(HttpServletRequest request, HttpServletResponse response) { + SessionMap sessionMap = getSessionMap(request); + + Long contentId = (Long) sessionMap.get(AssessmentConstants.ATTR_TOOL_CONTENT_ID); + Assessment assessment = service.getAssessmentByContentId(contentId); + + List questionSummaries = new ArrayList<>(); + for (AssessmentQuestion question : assessment.getQuestions()) { + if (question.getType().equals(QbQuestion.TYPE_VERY_SHORT_ANSWERS)) { + QuestionSummary questionSummary = service.getQuestionSummary(contentId, question.getUid()); + questionSummaries.add(questionSummary); + } + } + request.setAttribute("questionSummaries", questionSummaries); + + return "pages/monitoring/vsaAllocate"; + } + @RequestMapping(path = "/allocateUserAnswer", method = RequestMethod.POST) @ResponseBody public String allocateUserAnswer(HttpServletRequest request, HttpServletResponse response, Index: lams_tool_assessment/web/pages/monitoring/summary.jsp =================================================================== diff -u -r06f1e38880dbcfae6f115c7d9c9236fc4a377ce3 -r1d6afb88d2e239ea9e5c7ba3c6a3f5735c96a2e1 --- lams_tool_assessment/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 06f1e38880dbcfae6f115c7d9c9236fc4a377ce3) +++ lams_tool_assessment/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 1d6afb88d2e239ea9e5c7ba3c6a3f5735c96a2e1) @@ -553,6 +553,15 @@ + + +
+ + + +
+

Index: lams_tool_assessment/web/pages/monitoring/vsaAllocate.jsp =================================================================== diff -u --- lams_tool_assessment/web/pages/monitoring/vsaAllocate.jsp (revision 0) +++ lams_tool_assessment/web/pages/monitoring/vsaAllocate.jsp (revision 1d6afb88d2e239ea9e5c7ba3c6a3f5735c96a2e1) @@ -0,0 +1,214 @@ + +<%@ include file="/common/taglibs.jsp"%> + +<% pageContext.setAttribute("newLineChar", "\r\n"); %> + + + + <%@ include file="/common/header.jsp"%> + + + + + + + + + + + + + + + + + + + +

+ + + + + +
+
+
+ +
+
+ +
+ + + +
+ +
+
+ + +
+
+ +

+ + + + + + + + + : ${option0.maxMark} + + +

+ +
+ + : + ${fn:replace(option0.name, newLineChar, ', ')} +
+ +
+

+ +
+ +
+   + ${questionResult.answer} +
+
+
+
+ +
+ +

+ + + + + + + + + : ${option1.maxMark} + + +

+ +
+ + : + ${fn:replace(option1.name, newLineChar, ', ')} +
+
+ + + + +
+ + +
+

+ : ${optionDto.maxMark} +

+ +
+ + : + ${fn:replace(optionDto.name, newLineChar, ', ')} +
+ + +
+
+
+
+
+
+ + + +
\ No newline at end of file