Skip to content
Snippets Groups Projects
Commit 24e4a26f authored by srosse's avatar srosse
Browse files

OO-3551: change how the tools for the QTI 2.1 statistics are loaded in

the toolbar
parent c7fd7c53
No related branches found
No related tags found
No related merge requests found
......@@ -171,6 +171,7 @@ public class StatisticCourseNodesController extends BasicController implements A
String ident = te.getNodeId();
TreeNode selectedNode = courseTree.getTreeModel().getNodeById(ident);
doSelectNode(ureq, selectedNode);
initTools();
}
}
}
......@@ -188,6 +189,7 @@ public class StatisticCourseNodesController extends BasicController implements A
String selNodeId = nclr.getIdent();
courseTree.setSelectedNodeId(selNodeId);
doSelectNode(ureq, nclr);
initTools();
}
}
}
......@@ -210,9 +212,6 @@ public class StatisticCourseNodesController extends BasicController implements A
if(currentCtrl != null) {
listenTo(currentCtrl);
layoutCtr.setCol3(currentCtrl.getInitialComponent());
if(currentCtrl instanceof TooledController) {
((TooledController)currentCtrl).initTools();
}
} else {
layoutCtr.setCol3(new Panel("empty"));
}
......
......@@ -105,10 +105,8 @@ public class QTI21AssessmentTestStatisticsController extends BasicController imp
printLink = LinkFactory.createToolLink("print" + CodeHelper.getRAMUniqueID(), translate("print"), this);
printLink.setIconLeftCSS("o_icon o_icon_print o_icon-lg");
printLink.setPopup(new LinkPopupSettings(680, 500, "qti-stats"));
stackPanel.addTool(printLink, Align.right);
downloadRawLink = LinkFactory.createToolLink("download" + CodeHelper.getRAMUniqueID(), translate("download.raw.data"), this);
stackPanel.addTool(downloadRawLink, Align.right);
} else {
printLink = null;
downloadRawLink = LinkFactory.createLink("download.raw.data", mainVC, this);
......@@ -116,7 +114,6 @@ public class QTI21AssessmentTestStatisticsController extends BasicController imp
mainVC.put("download", downloadRawLink);
}
downloadRawLink.setIconLeftCSS("o_icon o_icon_download o_icon-lg");
if(withFilter && (resourceResult.canViewAnonymousUsers() || resourceResult.canViewNonParticipantUsers())) {
filterCtrl = new UserFilterController(ureq, getWindowControl(),
......@@ -241,12 +238,13 @@ public class QTI21AssessmentTestStatisticsController extends BasicController imp
List<ItemInfos> itemInfos = new ArrayList<>(statisticItems.size());
for (AssessmentItemStatistic statisticItem: statisticItems) {
AssessmentItem item = statisticItem.getAssessmentItem();
String label = Integer.toString(++i);
String text = item.getTitle();
d1.add(statisticItem.getAverageScore(), label);
d2.add(statisticItem.getNumOfCorrectAnswers(), label);
itemInfos.add(new ItemInfos(label, text));
if(item != null) {
String label = Integer.toString(++i);
String text = item.getTitle();
d1.add(statisticItem.getAverageScore(), label);
d2.add(statisticItem.getNumOfCorrectAnswers(), label);
itemInfos.add(new ItemInfos(label, text));
}
}
mainVC.contextPut("itemInfoList", itemInfos);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment