This commit is contained in:
Bertrand Cournaud 2012-05-22 09:38:37 +02:00
commit 8162bb2961
2 changed files with 6 additions and 5 deletions

View file

@ -21,7 +21,7 @@ class Question
$this->validator = $node->getAttribute("validator");
$this->question = $node->getAttribute("question");
$this->course = $node->getAttribute("course");
$answers = $node->getElementByTagName("answer");
for ($i = 0; $i < $answers->length; $i++)
$this->answers[] = $answers->item($i)->getAttribute("answer");
@ -54,7 +54,8 @@ class Question
{
echo 'Cours concerné : ' . $this->course . "<br>";
echo 'La question est : ' . $this->question . "<br>";
echo 'Les réponses sont : ' . print_r($this->answers, true);
echo 'Les réponses sont : ' . print_r($this->answers, true) . <br/>;
echo 'ID : ' . $this->id;
}
/**