Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-1103

QTI statistics: having multiple copies of a test/survey, only the statistics of the first are displayed

    XMLWordPrintable

    Details

      Description

      In a course, if there are multiple tests or surveys created as a copy of one qti.zip or one test/survey has been chosen as source for them, only the statistics of the first test/survey are displayed. E.g. when selecting the third item of the second survey, the tree navigation jumps to the third item of the first survey.

      The reason is, that the tree nodes has the same idents as the QTI items, which are in the case of a copy the same. For navigating in the tree, the node idents have to be unique, because getNodeById(ident) delivers the first occurence of the node in the tree.

      The following patch builds a tree with individual node idents by prefixing the item ident by the section ident which is individual.

      diff -r f425e397c1fd src/main/java/org/olat/ims/qti/statistics/QTIStatisticResourceResult.java
      --- a/src/main/java/org/olat/ims/qti/statistics/QTIStatisticResourceResult.java	Wed May 21 12:49:44 2014 +0200
      +++ b/src/main/java/org/olat/ims/qti/statistics/QTIStatisticResourceResult.java	Thu Jun 12 16:05:46 2014 +0200
      @@ -194,6 +194,7 @@
       			rootNode.addChild(sectionNode);
       			for (Item item : section.getItems()) {
       				GenericTreeNode itemNode = new ItemNode(item);
      +				itemNode.setIdent(sectionNode.getIdent()+itemNode.getIdent());
       				if(sectionNode.getDelegate() == null) {
       					sectionNode.setDelegate(itemNode);
       				}
      

      After several tests, it seems that this has no side effects.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              srosse Stéphane Rossé
              Reporter:
              stephan Stephan Clemenz
              Tester:
              Kirsten Scherer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 20 minutes
                  20m