comparison ape.js @ 381:b1cb28c63a19 Dev_main

Bugs #1454 #1391 buffers are pooled and loaded at the begining. Page Save not interface specific.
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Mon, 07 Dec 2015 18:42:36 +0000
parents f49339868324
children 38439b21d369
comparison
equal deleted inserted replaced
380:42cf69a134aa 381:b1cb28c63a19
640 }); 640 });
641 } 641 }
642 642
643 function pageXMLSave(store, testXML) 643 function pageXMLSave(store, testXML)
644 { 644 {
645 // MANDATORY
645 // Saves a specific test page 646 // Saves a specific test page
646 var xmlDoc = store; 647 // You can use this space to add any extra nodes to your XML saves
647 // Check if any session wide metrics are enabled
648
649 var commentShow = testXML.elementComments;
650
651 var metric = document.createElement('metric');
652 if (audioEngineContext.metric.enableTestTimer)
653 {
654 var testTime = document.createElement('metricResult');
655 testTime.id = 'testTime';
656 testTime.textContent = audioEngineContext.timer.testDuration;
657 metric.appendChild(testTime);
658 }
659 xmlDoc.appendChild(metric);
660 var audioObjects = audioEngineContext.audioObjects;
661 for (var i=0; i<audioObjects.length; i++)
662 {
663 var audioElement = audioEngineContext.audioObjects[i].exportXMLDOM();
664 audioElement.setAttribute('presentedId',i);
665 xmlDoc.appendChild(audioElement);
666 }
667
668 $(interfaceContext.commentQuestions).each(function(index,element){
669 var node = element.exportXMLDOM();
670 xmlDoc.appendChild(node);
671 });
672 store = xmlDoc;
673 } 648 }