on multichoice questions with multianswer, the code was not cleaning the variables correctly. Now sends the array through a foreach and then clean_param on each element in the array. Fix is around line 855.

This commit is contained in:
michaelpenne 2005-03-29 22:38:27 +00:00
parent 93943f6570
commit c32bc595bd

View File

@ -853,7 +853,10 @@
if ($page->qoption) {
// MULTIANSWER allowed, user's answer is an array
if (isset($_POST['answer'])) {
$useranswers = optional_param('answer');
$useranswers = $_POST['answer'];
foreach ($useranswers as $key => $useranswer) {
$useranswers[$key] = clean_param($useranswer, PARAM_INT);
}
} else {
$noanswer = true;
break;