Skip to content

Commit 9791101

Browse files
authored
Merge pull request #1357 from AlbertoMoreta/oppia-1643-improve-points-consistency
OPPIA-1643 - Add extra condition if tracker uuid is null
2 parents 0c0cf37 + aa6a981 commit 9791101

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/src/main/java/org/digitalcampus/oppia/utils/xmlreaders/CourseTrackerXMLReader.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.joda.time.DateTime;
3434
import org.w3c.dom.Document;
3535
import org.w3c.dom.NamedNodeMap;
36+
import org.w3c.dom.Node;
3637
import org.w3c.dom.NodeList;
3738
import org.xml.sax.InputSource;
3839
import org.xml.sax.SAXException;
@@ -98,8 +99,8 @@ public List<TrackerLog> getTrackers(Context ctx, long courseId, long userId) {
9899
NodeList actTrackers = document.getFirstChild().getChildNodes();
99100
for (int i = 0; i < actTrackers.getLength(); i++) {
100101
NamedNodeMap attrs = actTrackers.item(i).getAttributes();
101-
String uuid = attrs.getNamedItem(NODE_UUID).getTextContent();
102-
if (uuidList.contains(uuid)) {
102+
Node uuid = attrs.getNamedItem(NODE_UUID);
103+
if (uuid != null && uuidList.contains(uuid.getTextContent())) {
103104
continue;
104105
}
105106

0 commit comments

Comments
 (0)