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.
After several tests, it seems that this has no side effects.