Bug #1663

analyse.html expects at least one "surveyresult" element

Added by Giulio Moro over 8 years ago. Updated over 8 years ago.

Status:NewStart date:2016-03-12
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

and fails when no <surveryresult> element exist
from analyse.html:

                        root = xml.getElementsByTagName('waetresult')[0];

                        // get subject ID, add to array if not already there
                        pretestSurveyResult = root.getElementsByTagName('surveyresult')[0];
                        subjectID = pretestSurveyResult.getElementsByTagName('comment')[0];
                        if (subjectID){
                            if (subjectID.getAttribute('id')!='sessionId') { // warning in console when not available
                                console.log(xmlFiles[fileIndex]+': no SessionID available');
                            }
                            if (subjectArray.indexOf(subjectID.textContent) == -1) { // if not already in array
                                subjectArray.push(subjectID.textContent); // append to array
                            }
                        }

History

#1 Updated by Nicholas Jillings over 8 years ago

Analyse.html will be completely rewritten because there are a lot of things wrong with the way it operates. Plus it should be server agnostic.

Also available in: Atom PDF