mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
Merge branch 'wip-MDL-57257-master' of git://github.com/abgreeve/moodle
This commit is contained in:
commit
0183338c38
@ -87,12 +87,12 @@ class lesson_page_type_numerical extends lesson_page {
|
||||
$result->response = '';
|
||||
$result->newpageid = 0;
|
||||
|
||||
if (isset($data->answer)) {
|
||||
// just doing default PARAM_RAW, not doing PARAM_INT because it could be a float
|
||||
$result->useranswer = (float)$data->answer;
|
||||
} else {
|
||||
if (!isset($data->answer) || !is_numeric($data->answer)) {
|
||||
$result->noanswer = true;
|
||||
return $result;
|
||||
} else {
|
||||
// Just doing default PARAM_RAW, not doing PARAM_INT because it could be a float.
|
||||
$result->useranswer = (float)$data->answer;
|
||||
}
|
||||
$result->studentanswer = $result->userresponse = $result->useranswer;
|
||||
$answers = $this->get_answers();
|
||||
|
Loading…
x
Reference in New Issue
Block a user