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

dmlwriteexception in gradebook when creating module

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • None
    • 2.8.5
    • Gradebook
    • MOODLE_28_STABLE
    • Team '; drop tables Sprint 6

      After upgrade to 2.8.5+ weekly build. It gives dmlwriteexception when creating a quiz on course, where already have created quiz with older version of moodle.

      Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2
      WHERE itemid = '799' AND userid = '980'' at line 3
      UPDATE mdl_grade_grades
      SET aggregationstatus = 'used',
      aggregationweight = ?
      WHERE itemid = ? AND userid = ?
      [array (
      0 => 0.20000000000000001,
      1 => 799,
      2 => '980',
      )]
      Error code: dmlwriteexception
      Stack trace:
      line 446 of \lib\dml\moodle_database.php: dml_write_exception thrown
      line 974 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 808 of \lib\grade\grade_category.php: call to mysqli_native_moodle_database->execute()
      line 761 of \lib\grade\grade_category.php: call to grade_category->set_usedinaggregation()
      line 509 of \lib\grade\grade_category.php: call to grade_category->aggregate_grades()
      line 685 of \lib\grade\grade_item.php: call to grade_category->generate_grades()
      line 1102 of \lib\gradelib.php: call to grade_item->regrade_final_grades()
      line 334 of \course\modlib.php: call to grade_regrade_final_grades()
      line 166 of \course\modlib.php: call to edit_module_post_actions()
      line 266 of \course\modedit.php: call to add_moduleinfo()

      From mysql heres the line with itemid=799 and userid=980

      INSERT INTO `mdl_grade_grades` (`id`, `itemid`, `userid`, `rawgrade`, `rawgrademax`, `rawgrademin`, `rawscaleid`, `usermodified`, `finalgrade`, `hidden`, `locked`, `locktime`, `exported`, `overridden`, `excluded`, `feedback`, `feedbackformat`, `information`, `informationformat`, `timecreated`, `timemodified`, `aggregationstatus`, `aggregationweight`) VALUES
      (43871, 799, 980, '10.00000', '10.00000', '0.00000', NULL, 980, '10.00000', 0, 0, 0, 0, 0, 0, NULL, 0, NULL, 0, 1427119797, 1427119797, 'unknown', NULL);

            Unassigned Unassigned
            dacool Tero Nurminen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.