Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.0
-
Fix Version/s: None
-
Component/s: Gradebook
-
Labels:None
-
Environment:MySQL5 , IIS 7, PHP 5.2.8
-
Database:MySQL
-
Affected Branches:MOODLE_20_STABLE
Description
If you tryto create a grade category either simple or full view, if you do not select decimal to zero in drop down, system gives this error. Simply create a grade category, fill in max grade like 15 and leave decimal to default(2). If you select decimal to 0, no problem shows up. eventhough it gives DB error it still writes to the DB. This is the error
Out of range value adjusted for column 'decimals' at row 1
UPDATE mdl_grade_items SET courseid = ?,categoryid = ?,itemname = ?,itemtype = ?,itemmodule = ?,iteminstance = ?,itemnumber = ?,iteminfo = ?,idnumber = ?,calculation = ?,gradetype = ?,grademax = ?,grademin = ?,scaleid = ?,outcomeid = ?,gradepass = ?,multfactor = ?,plusfactor = ?,aggregationcoef = ?,sortorder = ?,display = ?,decimals = ?,hidden = ?,locked = ?,locktime = ?,needsupdate = ?,timecreated = ?,timemodified = ? WHERE id=?
[array ( 'courseid' => '4', 'categoryid' => NULL, 'itemname' => '', 'itemtype' => 'category', 'itemmodule' => NULL, 'iteminstance' => '6', 'itemnumber' => NULL, 'iteminfo' => '', 'idnumber' => '', 'calculation' => NULL, 'gradetype' => '1', 'grademax' => 85, 'grademin' => 0, 'scaleid' => NULL, 'outcomeid' => NULL, 'gradepass' => '0.00000', 'multfactor' => 1, 'plusfactor' => 0, 'aggregationcoef' => 0, 'sortorder' => '10', 'display' => '0', 'decimals' => '-1', 'hidden' => 0, 'locked' => '0', 'locktime' => '0', 'needsupdate' => 1, 'timecreated' => '1239310645', 'timemodified' => 1239310819, 0 => '23', )]
- line 308 of lib\dml\moodle_database.php: dml_write_exception thrown
- line 758 of lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 794 of lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
- line 206 of lib\grade\grade_object.php: call to mysqli_native_moodle_database->update_record()
- line 277 of lib\grade\grade_item.php: call to grade_object->update()
- line 594 of lib\grade\grade_item.php: call to grade_item->update()
- line 160 of grade\edit\tree\category.php: call to grade_item->set_hidden()
Issue Links
| This issue has been marked as being related by: | ||||
| MDL-29089 | In grade_items_history the field 'decimals' is set as NOT NULL, but without a default value, yet the creation of a new course, category, or forum (for example) attempts to insert NULL here |
|
|
|
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions