mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-44288 qtype_calculatedsimple fix validation notice.
The notice happend if you clicked Save changes before Find the wild cards {x..} present in the correct answer formulas.
This commit is contained in:
parent
ec4c8161a4
commit
dfcaa2450c
1 changed files with 6 additions and 1 deletions
|
@ -585,7 +585,12 @@ class qtype_calculatedsimple_edit_form extends qtype_calculated_edit_form {
|
|||
|
||||
public function validation($data, $files) {
|
||||
$errors = parent::validation($data, $files);
|
||||
|
||||
if (array_key_exists('number', $data)) {
|
||||
$numbers = $data['number'];
|
||||
} else {
|
||||
$numbers = array();
|
||||
}
|
||||
foreach ($numbers as $key => $number) {
|
||||
if (! is_numeric($number)) {
|
||||
if (stristr($number, ',')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue