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
Branches
No related tags found
No related merge requests found
......@@ -246,7 +246,11 @@ class grading_scheme_handler {
}
}
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) {
$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