mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-19121 Not allowing negative values for droplow and keephigh: capping at 0. Merged from MOODLE_19_STABLE
This commit is contained in:
parent
4b4c1d1d68
commit
b31f8d294d
@ -233,6 +233,10 @@ if ($form_key && $data = data_submitted()) {
|
||||
// Grade category text inputs
|
||||
if (preg_match('/(aggregation|droplow|keephigh)_([0-9]*)/', $key, $matches) && confirm_sesskey()) {
|
||||
$value = required_param($matches[0], PARAM_INT);
|
||||
|
||||
// Do not allow negative values
|
||||
$value = ($value < 0) ? 0 : $value;
|
||||
|
||||
$param = $matches[1];
|
||||
$a->id = $matches[2];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user