use of uk.ac.ed.ph.jqtiplus.node.test.AssessmentSection in project openolat by klemens.
the class QTI21StatisticResourceResult method buildRecursively.
private void buildRecursively(AssessmentTest test, GenericTreeNode rootTreeNode) {
// list all test parts
List<TestPart> parts = test.getTestParts();
if (parts.size() == 1) {
TreeNode firstItem = null;
List<AssessmentSection> sections = test.getTestParts().get(0).getAssessmentSections();
for (AssessmentSection section : sections) {
TreeNode itemNode = buildRecursively(section, rootTreeNode);
if (firstItem == null) {
firstItem = itemNode;
}
}
} else {
int counter = 0;
for (TestPart part : parts) {
buildRecursively(part, ++counter, rootTreeNode);
}
}
}
use of uk.ac.ed.ph.jqtiplus.node.test.AssessmentSection in project openolat by klemens.
the class QTI21StatisticResourceResult method buildRecursively.
private void buildRecursively(TestPart part, int pos, TreeNode parentNode) {
GenericTreeNode partNode = new GenericTreeNode();
partNode.setTitle(pos + ". Test part");
partNode.setIconCssClass("o_icon o_qtiassessment_icon");
partNode.setUserObject(part);
parentNode.addChild(partNode);
TreeNode firstItem = null;
List<AssessmentSection> sections = part.getAssessmentSections();
for (AssessmentSection section : sections) {
TreeNode itemNode = buildRecursively(section, partNode);
if (firstItem == null) {
firstItem = itemNode;
}
}
partNode.setDelegate(firstItem);
}
Aggregations