mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
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:
parent
93943f6570
commit
c32bc595bd
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user