Skip to content
Snippets Groups Projects
Commit 0d250731 authored by Alexander Loewe's avatar Alexander Loewe
Browse files

Fixed a Problem with test titles in grading scheme

parent ac928505
No related branches found
No related tags found
No related merge requests found
...@@ -246,7 +246,11 @@ class grading_scheme_handler { ...@@ -246,7 +246,11 @@ class grading_scheme_handler {
} }
} }
if(!$foundTitle) { if(!$foundTitle) {
$node->set_title($this->tests[$refid] !== null && $this->tests[$refid]->getElementsByTagNameNS($this->namespace, 'title')[0]->nodeValue); $title = "";
if ($this->tests[$refid] !== null && $this->tests[$refid]->getElementsByTagNameNS($this->namespace, 'title')->length >= 1) {
$title = $this->tests[$refid]->getElementsByTagNameNS($this->namespace, 'title')[0]->nodeValue;
}
$node->set_title($title);
} }
if (($list = $elem->getElementsByTagNameNS($this->namespace, 'description'))->length == 1) { if (($list = $elem->getElementsByTagNameNS($this->namespace, 'description'))->length == 1) {
$node->set_description($list[0]->nodeValue); $node->set_description($list[0]->nodeValue);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment