mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-50394 core_course: fixed form validation of 'gradepass'
This commit is contained in:
parent
0c6faf4b51
commit
9758da6ed5
2 changed files with 18 additions and 4 deletions
|
@ -262,6 +262,12 @@ if ($mform->is_cancelled()) {
|
|||
redirect(course_get_url($course, $cw->section, array('sr' => $sectionreturn)));
|
||||
}
|
||||
} else if ($fromform = $mform->get_data()) {
|
||||
// Convert the grade pass value - we may be using a language which uses commas,
|
||||
// rather than decimal points, in numbers. These need to be converted so that
|
||||
// they can be added to the DB.
|
||||
if (isset($fromform->gradepass)) {
|
||||
$fromform->gradepass = unformat_float($fromform->gradepass);
|
||||
}
|
||||
|
||||
if (!empty($fromform->update)) {
|
||||
list($cm, $fromform) = update_moduleinfo($cm, $fromform, $course, $mform);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue