Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/TblMonitoringController.java =================================================================== diff -u -r151dcb61cfdde12e6883f1067a86befa00d4ab9e -rac5039692e638736c0652cf6ce44bb4121f87bd6 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/TblMonitoringController.java (.../TblMonitoringController.java) (revision 151dcb61cfdde12e6883f1067a86befa00d4ab9e) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/TblMonitoringController.java (.../TblMonitoringController.java) (revision ac5039692e638736c0652cf6ce44bb4121f87bd6) @@ -201,8 +201,8 @@ /** * Shows ira StudentChoices page */ - @RequestMapping("aesStudentChoices") - public String aesStudentChoices(HttpServletRequest request) { + @RequestMapping("aesStudentChoicesTable") + public String aesStudentChoicesTable(HttpServletRequest request) { Long toolContentId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); Assessment assessment = assessmentService.getAssessmentByContentId(toolContentId); Map questionSummaries = assessmentService.getQuestionSummaryForExport(assessment, false); @@ -211,10 +211,6 @@ QuestionDTO questionDto = questionSummary.getQuestionDto(); TblAssessmentQuestionDTO tblQuestionDto = new TblAssessmentQuestionDTO(); - tblQuestionDto.setTitle(questionDto.getTitle()); - tblQuestionDto - .setQuestionTypeLabel(AssessmentServiceImpl.getQuestionTypeLanguageLabel(questionDto.getType())); - tblQuestionDto.setCorrectAnswer(getAssessmentCorrectAnswer(questionDto)); List sessionQuestionResults = new ArrayList<>(); for (List questionResultsPerSession : questionSummary @@ -274,10 +270,32 @@ request.setAttribute("sessions", sessions); request.setAttribute("questionDtos", tblQuestionDtos); + + return "pages/tblmonitoring/assessmentStudentChoicesTable"; + } + + @RequestMapping("aesStudentChoices") + public String aesStudentChoices(HttpServletRequest request) { + Long toolContentId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); + Assessment assessment = assessmentService.getAssessmentByContentId(toolContentId); + Map questionSummaries = assessmentService.getQuestionSummaryForExport(assessment, false); + List tblQuestionDtos = new ArrayList<>(); + for (QuestionSummary questionSummary : questionSummaries.values()) { + QuestionDTO questionDto = questionSummary.getQuestionDto(); + + TblAssessmentQuestionDTO tblQuestionDto = new TblAssessmentQuestionDTO(); + tblQuestionDto.setTitle(questionDto.getTitle()); + tblQuestionDto + .setQuestionTypeLabel(AssessmentServiceImpl.getQuestionTypeLanguageLabel(questionDto.getType())); + tblQuestionDto.setCorrectAnswer(getAssessmentCorrectAnswer(questionDto)); + + tblQuestionDtos.add(tblQuestionDto); + } + + request.setAttribute("questionDtos", tblQuestionDtos); request.setAttribute(AttributeNames.PARAM_TOOL_CONTENT_ID, toolContentId); request.setAttribute("groupsInAnsweredQuestionsChart", assessment.isUseSelectLeaderToolOuput()); request.setAttribute("assessment", assessment); - request.setAttribute("isTbl", true); return "pages/tblmonitoring/assessmentStudentChoices5"; } Index: lams_tool_assessment/web/pages/tblmonitoring/assessmentStudentChoices5.jsp =================================================================== diff -u -rac1bc5dc42645586cf573699676b6f73fcf59d09 -rac5039692e638736c0652cf6ce44bb4121f87bd6 --- lams_tool_assessment/web/pages/tblmonitoring/assessmentStudentChoices5.jsp (.../assessmentStudentChoices5.jsp) (revision ac1bc5dc42645586cf573699676b6f73fcf59d09) +++ lams_tool_assessment/web/pages/tblmonitoring/assessmentStudentChoices5.jsp (.../assessmentStudentChoices5.jsp) (revision ac5039692e638736c0652cf6ce44bb4121f87bd6) @@ -48,8 +48,17 @@ COMPLETION_CHART_UPDATE_INTERVAL = 10 * 1000; $(document).ready(function(){ - drawCompletionCharts(${toolContentID}, ${groupsInAnsweredQuestionsChart}, true); + openEventSource('monitoring/getCompletionChartsData.do?toolContentId=${toolContentID}', function(event) { + if (!event.data) { + return; + } + var data = JSON.parse(event.data); + drawActivityCompletionChart(data, true); + drawAnsweredQuestionsChart(data, ${groupsInAnsweredQuestionsChart}, true); + $('#student-choices-table').load('tblmonitoring/aesStudentChoicesTable.do?toolContentID=${toolContentID}'); + }); + $('#time-limit-panel-placeholder').load('${timeLimitPanelUrl}'); }); @@ -146,23 +155,9 @@ - - - - - ${session.sessionName} - - - - - bg-success" > - ${questionResultDto.answer} - - - - - + + Index: lams_tool_assessment/web/pages/tblmonitoring/assessmentStudentChoicesTable.jsp =================================================================== diff -u --- lams_tool_assessment/web/pages/tblmonitoring/assessmentStudentChoicesTable.jsp (revision 0) +++ lams_tool_assessment/web/pages/tblmonitoring/assessmentStudentChoicesTable.jsp (revision ac5039692e638736c0652cf6ce44bb4121f87bd6) @@ -0,0 +1,16 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + ${session.sessionName} + + + + + bg-success" > + ${questionResultDto.answer} + + + + + \ No newline at end of file