Fix Question getter; search ID
This commit is contained in:
parent
7e7b77769f
commit
ec83fb3121
2 changed files with 5 additions and 4 deletions
|
|
@ -22,7 +22,7 @@ class Question
|
|||
$this->question = $node->getAttribute("question");
|
||||
$this->course = $node->getAttribute("course");
|
||||
|
||||
$answers = $node->getElementByTagName("answer");
|
||||
$answers = $node->getElementsByTagName("answer");
|
||||
for ($i = 0; $i < $answers->length; $i++)
|
||||
$this->answers[] = $answers->item($i)->getAttribute("answer");
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@ class Question
|
|||
{
|
||||
$qnode = $root->createElement("question");
|
||||
|
||||
$qnode->setAttribute("id", $this->id);
|
||||
$qnode->setAttribute("xml:id", $this->id);
|
||||
$qnode->setAttribute("addedtime", $this->added_time);
|
||||
$qnode->setAttribute("validated", $this->validated);
|
||||
$qnode->setAttribute("validator", $this->validator);
|
||||
|
|
|
|||
Reference in a new issue