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

1.8->1.9 upgrade fails on grades conversion

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Gradebook
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      From this morning's code

      assignment module needs upgrading
      Column 'display' cannot be null

      INSERT INTO mdl_grade_items ( COURSEID, CATEGORYID, ITEMNAME, ITEMTYPE, ITEMMODULE, ITEMINSTANCE, ITEMNUMBER, ITEMINFO, IDNUMBER, CALCULATION, GRADETYPE, GRADEMAX, GRADEMIN, SCALEID, OUTCOMEID, GRADEPASS, MULTFACTOR, PLUSFACTOR, AGGREGATIONCOEF, SORTORDER, DISPLAY, HIDDEN, LOCKED, LOCKTIME, NEEDSUPDATE, TIMECREATED, TIMEMODIFIED ) VALUES ( 2, 1, 'asdf', 'mod', 'assignment', 1, 0, null, null, null, 1, 100, 0, null, null, 0, 1, 0, 0, 1, null, 0, 0, 0, 1, 1190254672, 1190254672 )

      • line 1474 of lib/dmllib.php: call to debugging()
      • line 265 of lib/grade/grade_object.php: call to insert_record()
      • line 369 of lib/grade/grade_item.php: call to grade_object->insert()
      • line 127 of lib/gradelib.php: call to grade_item->insert()
      • line 2115 of mod/assignment/lib.php: call to grade_update()
      • line 2073 of mod/assignment/lib.php: call to assignment_grade_item_update()
      • line 30 of mod/assignment/db/upgrade.php: call to assignment_update_grades()
      • line 304 of lib/adminlib.php: call to xmldb_assignment_upgrade()
      • line 393 of admin/index.php: call to upgrade_activity_modules()

      Could not insert object into db

      • line 266 of lib/grade/grade_object.php: call to debugging()
      • line 369 of lib/grade/grade_item.php: call to grade_object->insert()
      • line 127 of lib/gradelib.php: call to grade_item->insert()
      • line 2115 of mod/assignment/lib.php: call to grade_update()
      • line 2073 of mod/assignment/lib.php: call to assignment_grade_item_update()
      • line 30 of mod/assignment/db/upgrade.php: call to assignment_update_grades()
      • line 304 of lib/adminlib.php: call to xmldb_assignment_upgrade()
      • line 393 of admin/index.php: call to upgrade_activity_modules()

      Could not insert this grade_item in the database!

      • line 375 of lib/grade/grade_item.php: call to debugging()
      • line 127 of lib/gradelib.php: call to grade_item->insert()
      • line 2115 of mod/assignment/lib.php: call to grade_update()
      • line 2073 of mod/assignment/lib.php: call to assignment_grade_item_update()
      • line 30 of mod/assignment/db/upgrade.php: call to assignment_update_grades()
      • line 304 of lib/adminlib.php: call to xmldb_assignment_upgrade()
      • line 393 of admin/index.php: call to upgrade_activity_modules()

      Column 'display' cannot be null

      INSERT INTO mdl_grade_items ( COURSEID, CATEGORYID, ITEMNAME, ITEMTYPE, ITEMMODULE, ITEMINSTANCE, ITEMNUMBER, ITEMINFO, IDNUMBER, CALCULATION, GRADETYPE, GRADEMAX, GRADEMIN, SCALEID, OUTCOMEID, GRADEPASS, MULTFACTOR, PLUSFACTOR, AGGREGATIONCOEF, SORTORDER, DISPLAY, HIDDEN, LOCKED, LOCKTIME, NEEDSUPDATE, TIMECREATED, TIMEMODIFIED ) VALUES ( 2, 1, 'asdf', 'mod', 'assignment', 1, 0, null, null, null, 1, 100, 0, null, null, 0, 1, 0, 0, 1, null, 0, 0, 0, 1, 1190254672, 1190254672 )

      • line 1474 of lib/dmllib.php: call to debugging()
      • line 265 of lib/grade/grade_object.php: call to insert_record()
      • line 369 of lib/grade/grade_item.php: call to grade_object->insert()
      • line 127 of lib/gradelib.php: call to grade_item->insert()
      • line 2115 of mod/assignment/lib.php: call to grade_update()
      • line 2062 of mod/assignment/lib.php: call to assignment_grade_item_update()
      • line 2075 of mod/assignment/lib.php: call to assignment_update_grades()
      • line 30 of mod/assignment/db/upgrade.php: call to assignment_update_grades()
      • line 304 of lib/adminlib.php: call to xmldb_assignment_upgrade()
      • line 393 of admin/index.php: call to upgrade_activity_modules()

      Could not insert object into db

      • line 266 of lib/grade/grade_object.php: call to debugging()
      • line 369 of lib/grade/grade_item.php: call to grade_object->insert()
      • line 127 of lib/gradelib.php: call to grade_item->insert()
      • line 2115 of mod/assignment/lib.php: call to grade_update()
      • line 2062 of mod/assignment/lib.php: call to assignment_grade_item_update()
      • line 2075 of mod/assignment/lib.php: call to assignment_update_grades()
      • line 30 of mod/assignment/db/upgrade.php: call to assignment_update_grades()
      • line 304 of lib/adminlib.php: call to xmldb_assignment_upgrade()
      • line 393 of admin/index.php: call to upgrade_activity_modules()

      Could not insert this grade_item in the database!

      • line 375 of lib/grade/grade_item.php: call to debugging()
      • line 127 of lib/gradelib.php: call to grade_item->insert()
      • line 2115 of mod/assignment/lib.php: call to grade_update()
      • line 2062 of mod/assignment/lib.php: call to assignment_grade_item_update()
      • line 2075 of mod/assignment/lib.php: call to assignment_update_grades()
      • line 30 of mod/assignment/db/upgrade.php: call to assignment_update_grades()
      • line 304 of lib/adminlib.php: call to xmldb_assignment_upgrade()
      • line 393 of admin/index.php: call to upgrade_activity_modules()

      Column 'display' cannot be null

      INSERT INTO mdl_grade_items ( COURSEID, CATEGORYID, ITEMNAME, ITEMTYPE, ITEMMODULE, ITEMINSTANCE, ITEMNUMBER, ITEMINFO, IDNUMBER, CALCULATION, GRADETYPE, GRADEMAX, GRADEMIN, SCALEID, OUTCOMEID, GRADEPASS, MULTFACTOR, PLUSFACTOR, AGGREGATIONCOEF, SORTORDER, DISPLAY, HIDDEN, LOCKED, LOCKTIME, NEEDSUPDATE, TIMECREATED, TIMEMODIFIED ) VALUES ( 2, 1, null, 'mod', 'assignment', 1, 0, null, null, null, 1, 100, 0, null, null, 0, 1, 0, 0, 1, null, 0, 0, 0, 1, 1190254672, 1190254672 )

      • line 1474 of lib/dmllib.php: call to debugging()
      • line 265 of lib/grade/grade_object.php: call to insert_record()
      • line 369 of lib/grade/grade_item.php: call to grade_object->insert()
      • line 127 of lib/gradelib.php: call to grade_item->insert()
      • line 2063 of mod/assignment/lib.php: call to grade_update()
      • line 2075 of mod/assignment/lib.php: call to assignment_update_grades()
      • line 30 of mod/assignment/db/upgrade.php: call to assignment_update_grades()
      • line 304 of lib/adminlib.php: call to xmldb_assignment_upgrade()
      • line 393 of admin/index.php: call to upgrade_activity_modules()

      Could not insert object into db

      • line 266 of lib/grade/grade_object.php: call to debugging()
      • line 369 of lib/grade/grade_item.php: call to grade_object->insert()
      • line 127 of lib/gradelib.php: call to grade_item->insert()
      • line 2063 of mod/assignment/lib.php: call to grade_update()
      • line 2075 of mod/assignment/lib.php: call to assignment_update_grades()
      • line 30 of mod/assignment/db/upgrade.php: call to assignment_update_grades()
      • line 304 of lib/adminlib.php: call to xmldb_assignment_upgrade()
      • line 393 of admin/index.php: call to upgrade_activity_modules()

      Could not insert this grade_item in the database!

      • line 375 of lib/grade/grade_item.php: call to debugging()
      • line 127 of lib/gradelib.php: call to grade_item->insert()
      • line 2063 of mod/assignment/lib.php: call to grade_update()
      • line 2075 of mod/assignment/lib.php: call to assignment_update_grades()
      • line 30 of mod/assignment/db/upgrade.php: call to assignment_update_grades()
      • line 304 of lib/adminlib.php: call to xmldb_assignment_upgrade()
      • line 393 of admin/index.php: call to upgrade_activity_modules()

      Missing itemid

      • line 163 of lib/grade/grade_grade.php: call to debugging()
      • line 205 of lib/grade/grade_grade.php: call to grade_grade->load_grade_item()
      • line 1410 of lib/grade/grade_item.php: call to grade_grade->is_locked()
      • line 209 of lib/gradelib.php: call to grade_item->update_raw_grade()
      • line 2063 of mod/assignment/lib.php: call to grade_update()
      • line 2075 of mod/assignment/lib.php: call to assignment_update_grades()
      • line 30 of mod/assignment/db/upgrade.php: call to assignment_update_grades()
      • line 304 of lib/adminlib.php: call to xmldb_assignment_upgrade()
      • line 393 of admin/index.php: call to upgrade_activity_modules()

      Fatal error: Call to a member function is_locked() on a non-object in /var/www/dev/lib/grade/grade_grade.php on line 207

        Attachments

          Activity

            People

            • Assignee:
              lazyfish Yu Zhang
              Reporter:
              lazyfish Yu Zhang
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Ryan Wyllie
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08