0002821
authorheidi valles <hvalles@ocad.ca>
Thu, 9 Nov 2006 21:31:00 +0000 (21:31 -0000)
committerheidi valles <hvalles@ocad.ca>
Thu, 9 Nov 2006 21:31:00 +0000 (21:31 -0000)
docs/tools/tests/create_question_likert.php
docs/tools/tests/edit_question_likert.php

index fea27b4..6227730 100644 (file)
@@ -51,7 +51,7 @@ if (isset($_POST['cancel'])) {
 
                for ($i=0; $i<10; $i++) {
                        $_POST['choice'][$i] = $addslashes(trim($_POST['choice'][$i]));
-                       $_POST['answer'][$i] = $addslashes(intval($_POST['answer'][$i]));
+                       $_POST['answer'][$i] = intval($_POST['answer'][$i]);
 
                        if ($_POST['choice'][$i] == '') {
                                /* an empty option can't be correct */
index 15b589e..8dd1cad 100644 (file)
@@ -57,7 +57,7 @@ if (isset($_POST['cancel'])) {
                $_POST['question'] = $addslashes($_POST['question']);
 
                for ($i=0; $i<10; $i++) {
-                       $_POST['choice'][$i] = trim($_POST['choice'][$i]);
+                       $_POST['choice'][$i] = $addslashes(trim($_POST['choice'][$i]));
                        $_POST['answer'][$i] = intval($_POST['answer'][$i]);
 
                        if ($_POST['choice'][$i] == '') {