diff --git a/Question.class.php b/Question.class.php index 107e7ad..273e8ed 100644 --- a/Question.class.php +++ b/Question.class.php @@ -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 . "
"; echo 'La question est : ' . $this->question . "
"; - echo 'Les réponses sont : ' . print_r($this->answers, true); + echo 'Les réponses sont : ' . print_r($this->answers, true) .
; + echo 'ID : ' . $this->id; } /** diff --git a/questions.php b/questions.php index 79fe2b7..128f55a 100755 --- a/questions.php +++ b/questions.php @@ -30,11 +30,11 @@ if (isset ($_POST['send'])) $quest->print_test(); // @TODO: Create/Load a QuestionFile and add the question (it must be unique) - + // @TODO: Find a validator (from the list of previous senders for example?) - + // @TODO: Update the question and save the file - + // @TODO: Send mail to the selected validator /* This code works, perhaps should be placed in a method in Question class?