Mercurial > hg > webaudioevaluationtool
changeset 2164:ce24c304f93c
comment/score _parser.php updated to match 'ref' 'name' attribute changes.
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Wed, 16 Mar 2016 16:52:30 +0000 |
parents | ce01a65af160 |
children | e75107c82178 |
files | scripts/comment_parser.php scripts/score_parser.php |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/comment_parser.php Wed Mar 16 16:16:05 2016 +0000 +++ b/scripts/comment_parser.php Wed Mar 16 16:52:30 2016 +0000 @@ -37,14 +37,14 @@ $page_struct = null; foreach($comment_struct as $comment_struct_page) { - if ($pageInstance['id'] == $comment_struct_page->id) + if ($pageInstance['ref'] == $comment_struct_page->id) { $page_struct = $comment_struct_page; break; } } if ($page_struct == null) { - array_push($comment_struct,new testPage($pageInstance['id'])); + array_push($comment_struct,new testPage($pageInstance['ref'])); $page_struct = $comment_struct[count($comment_struct)-1]; } // Get the audioelements of the page @@ -54,14 +54,14 @@ $element_struct = null; foreach($page_struct->elements as $page_struct_element) { - if ($fragment['id'] == $page_struct_element->id) + if ($fragment['name'] == $page_struct_element->id) { $element_struct = $page_struct_element; break; } } if ($element_struct == null) { - array_push($page_struct->elements,new audioElement($fragment['id'])); + array_push($page_struct->elements,new audioElement($fragment['name'])); $element_struct = $page_struct->elements[count($page_struct->elements)-1]; } $element_struct->addComment($fragment->comment->response);
--- a/scripts/score_parser.php Wed Mar 16 16:16:05 2016 +0000 +++ b/scripts/score_parser.php Wed Mar 16 16:52:30 2016 +0000 @@ -64,7 +64,7 @@ foreach($xml_object->page as $pageInstance) { // Find in the nest - $pageInstanceId = $pageInstance['id']; + $pageInstanceId = $pageInstance['ref']; $page_nest = $root->findChild($pageInstanceId); if ($page_nest == null) { $page_nest = $root->addNewChild($pageInstanceId); @@ -73,7 +73,7 @@ // Iterate over each $element node foreach($pageInstance->audioelement as $element) { // Find our specific element tag - $elementId = $element['id']; + $elementId = $element['name']; $element_nest = $page_nest->findChild($elementId); if ($element_nest == null) { $element_nest = $page_nest->addNewChild($elementId);