Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-18826

grade category creation decimal failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • 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()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ltmert mert gokkaya
                Participants:
                Component watchers:
                Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: