From cee36c1c13c71505b398dc6bbfee87c999e35a6a Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Tue, 17 Jun 2014 13:53:47 +0200
Subject: [PATCH] OO-1103: make identifier of the item node in qti statistics
 independent of the real item

---
 .../olat/ims/qti/statistics/QTIStatisticResourceResult.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/main/java/org/olat/ims/qti/statistics/QTIStatisticResourceResult.java b/src/main/java/org/olat/ims/qti/statistics/QTIStatisticResourceResult.java
index b5870af8f73..0c0a52e01e7 100644
--- a/src/main/java/org/olat/ims/qti/statistics/QTIStatisticResourceResult.java
+++ b/src/main/java/org/olat/ims/qti/statistics/QTIStatisticResourceResult.java
@@ -29,6 +29,7 @@ import org.olat.core.gui.components.tree.TreeNode;
 import org.olat.core.gui.control.Controller;
 import org.olat.core.gui.control.WindowControl;
 import org.olat.core.id.OLATResourceable;
+import org.olat.core.util.CodeHelper;
 import org.olat.core.util.nodes.INode;
 import org.olat.core.util.resource.OresHelper;
 import org.olat.course.nodes.CourseNodeConfiguration;
@@ -194,6 +195,8 @@ public class QTIStatisticResourceResult implements StatisticResourceResult {
 			rootNode.addChild(sectionNode);
 			for (Item item : section.getItems()) {
 				GenericTreeNode itemNode = new ItemNode(item);
+				itemNode.setIdent(Long.toString(CodeHelper.getForeverUniqueID()));
+				
 				if(sectionNode.getDelegate() == null) {
 					sectionNode.setDelegate(itemNode);
 				}
-- 
GitLab