Index: lams_tool_scratchie/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r28bb739e836336c748d3306f97a9ab79bfd9088c -r42acec78d2cee4dd172267c4b82001b08b3612cc --- lams_tool_scratchie/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 28bb739e836336c748d3306f97a9ab79bfd9088c) +++ lams_tool_scratchie/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 42acec78d2cee4dd172267c4b82001b08b3612cc) @@ -290,3 +290,4 @@ label.total.1st.attempt.by.team = Sums all the times in which the team answered correctly in their first attempt. label.total.1st.attempt.by.question = Sums all the teams that answer this question correctly in their first attempt. label.total.1st.attempt.average = Average of all the times in which teams answered questions correctly in their first attempt. +label.export.overall.summary = Overall summary Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java =================================================================== diff -u -r90eadf79ce00cf2369410b1a54ada3623bbb05ff -r42acec78d2cee4dd172267c4b82001b08b3612cc --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java (.../ScratchieServiceImpl.java) (revision 90eadf79ce00cf2369410b1a54ada3623bbb05ff) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java (.../ScratchieServiceImpl.java) (revision 42acec78d2cee4dd172267c4b82001b08b3612cc) @@ -1405,9 +1405,39 @@ ExcelSheet reportByTeamSheet = new ExcelSheet(getMessage("label.report.by.team.tra")); sheets.add(reportByTeamSheet); - row = reportByTeamSheet.initRow(); - row.addCell(getMessage("label.quick.analysis"), true); + LeaderResultsDTO overallDTO = getLeaderResultsDTOForLeaders(contentId); + ExcelRow overallSummaryRow = reportByTeamSheet.initRow(); + overallSummaryRow.addCell(getMessage("label.export.overall.summary"), true); + reportByTeamSheet.addEmptyRow(); + + overallSummaryRow = reportByTeamSheet.initRow(); + overallSummaryRow.addCell(getMessage("label.number.groups.finished"), true); + overallSummaryRow.addCell(overallDTO.getCount()); + + overallSummaryRow = reportByTeamSheet.initRow(); + overallSummaryRow.addCell(getMessage("label.lowest.mark"), true); + overallSummaryRow.addCell(overallDTO.getMin() == null ? 0 : overallDTO.getMin()); + + overallSummaryRow = reportByTeamSheet.initRow(); + overallSummaryRow.addCell(getMessage("label.highest.mark"), true); + overallSummaryRow.addCell(overallDTO.getMax() == null ? 0 : overallDTO.getMax()); + + overallSummaryRow = reportByTeamSheet.initRow(); + overallSummaryRow.addCell(getMessage("label.average.mark") + ":", true); + overallSummaryRow.addCell(overallDTO.getAverage() == null ? 0 : overallDTO.getAverage()); + + overallSummaryRow = reportByTeamSheet.initRow(); + overallSummaryRow.addCell(getMessage("label.median.mark"), true); + overallSummaryRow.addCell(overallDTO.getMedian() == null ? 0 : overallDTO.getMedian()); + + overallSummaryRow = reportByTeamSheet.initRow(); + overallSummaryRow.addCell(getMessage("label.modes.mark"), true); + overallSummaryRow.addCell(overallDTO.getModesString()); + reportByTeamSheet.addEmptyRow(); + reportByTeamSheet.addEmptyRow(); + reportByTeamSheet.addEmptyRow(); + row = reportByTeamSheet.initRow(); row.addEmptyCell(); row.addCell(getMessage("label.table.below.shows.which.answer.teams.selected.first.try")); @@ -2002,8 +2032,8 @@ model.put("sessionDtos", groupSummaries); for (ScratchieItem item : itemList) { - item.setCorrectOnFirstAttemptPercent( - groupSummaries.isEmpty() ? 0 : (double) item.getCorrectOnFirstAttemptCount() * 100 / groupSummaries.size()); + item.setCorrectOnFirstAttemptPercent(groupSummaries.isEmpty() ? 0 + : (double) item.getCorrectOnFirstAttemptCount() * 100 / groupSummaries.size()); } return model;