Browse Source

Fix #371 set grade to 0 if null.

MOODLE_35_STABLE
Dan Marsden 6 years ago
parent
commit
f9a0425f04
  1. 2
      preferences.php

2
preferences.php

@ -70,7 +70,7 @@ switch ($att->pageparams->action) {
$newdescription = optional_param('newdescription', null, PARAM_TEXT); $newdescription = optional_param('newdescription', null, PARAM_TEXT);
$newgrade = optional_param('newgrade', 0, PARAM_RAW); $newgrade = optional_param('newgrade', 0, PARAM_RAW);
$newstudentavailability = optional_param('newstudentavailability', null, PARAM_INT); $newstudentavailability = optional_param('newstudentavailability', null, PARAM_INT);
$newgrade = unformat_float($newgrade); $newgrade = empty($newgrade) ? 0 : unformat_float($newgrade);
$newstatus = new stdClass(); $newstatus = new stdClass();
$newstatus->attendanceid = $att->id; $newstatus->attendanceid = $att->id;

Loading…
Cancel
Save