comparison scripts/score_parser.php @ 1274:f22a6240fb51

Fixed some comment/score parser issues on PHP.
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Thu, 24 Mar 2016 12:29:39 +0000
parents 4fb8222b96ae
children
comparison
equal deleted inserted replaced
1273:227ca4d00ab1 1274:f22a6240fb51
71 } 71 }
72 72
73 // Iterate over each $element node 73 // Iterate over each $element node
74 foreach($pageInstance->audioelement as $element) { 74 foreach($pageInstance->audioelement as $element) {
75 // Find our specific element tag 75 // Find our specific element tag
76 $elementId = $element['name']; 76 $elementId = null;
77 if (isset($element['name'])) {
78 $elementId = $element['name'];
79 } else {
80 $elementId = $element['ref'];
81 }
77 $element_nest = $page_nest->findChild($elementId); 82 $element_nest = $page_nest->findChild($elementId);
78 if ($element_nest == null) { 83 if ($element_nest == null) {
79 $element_nest = $page_nest->addNewChild($elementId); 84 $element_nest = $page_nest->addNewChild($elementId);
80 } 85 }
81 // Now get the <value> tags 86 // Now get the <value> tags