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

Assignment Module Submissions SQL overflow

XMLWordPrintable

    • MySQL
    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE
    • wip-MDL-27638-master
    • Hide

      Remove the line...

      COALESCE(SIGN(SIGN(s.timemarked) + SIGN(s.timemarked - s.timemodified)), 0) AS status

      ...from two queries in assignment/lib.php. Be sure to leave a space before the FROM.

      Show
      Remove the line... COALESCE(SIGN(SIGN(s.timemarked) + SIGN(s.timemarked - s.timemodified)), 0) AS status ...from two queries in assignment/lib.php. Be sure to leave a space before the FROM.
    • Hide

      This needs to be tested on MySQL version > 5.5 and probably on a couple of other database engines as well.

      Show
      This needs to be tested on MySQL version > 5.5 and probably on a couple of other database engines as well.

      Completed an upgrade from Moodle 1.9.12+ to Moodle 2.0.2+ of all of our systems. Many of my assignments in the system with user data in them are returning these errors when visited. I have turned on the full debugging.

      Warning: mysqli::query(): (22003/1690): BIGINT UNSIGNED value is out of range in '(`mdl_viu_primary`.`s`.`timemarked` - `mdl_viu_primary`.`s`.`timemodified`)' in /share-viu/viu/moodlePrimary/lib/dml/mysqli_native_moodle_database.php on line 793
      Error reading from database

      More information about this error

      Debug info: BIGINT UNSIGNED value is out of range in '(`mdl_viu_primary`.`s`.`timemarked` - `mdl_viu_primary`.`s`.`timemodified`)'
      SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email,
      s.id AS submissionid, s.grade, s.submissioncomment,
      s.timemodified, s.timemarked,
      COALESCE(SIGN(SIGN(s.timemarked) + SIGN(s.timemarked - s.timemodified)), 0) AS status FROM mdl_user u LEFT JOIN mdl_assignment_submissions s ON u.id = s.userid
      AND s.assignment = 6994 WHERE u.id IN (8066,8790,13244,13314,13600,13604,14554,15678,17371,17480,17616,17695,18138,18144,18501,18526,18702,20388,20844,21230,21239,21240,21250,21256) ORDER BY lastname ASC
      [array (
      )]
      Stack trace:
      line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 794 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1295 of /mod/assignment/lib.php: call to mysqli_native_moodle_database->get_records_sql()
      line 642 of /mod/assignment/lib.php: call to assignment_base->display_submissions()
      line 57 of /mod/assignment/submissions.php: call to assignment_base->submissions()

      Replication instructions:

      1. log in as an admin
      2. create a new assignment within a course
      3. log in as a student and submit and assignment
      4. log back in as the admin
      5. view the assignment and click View submissions
      6. Ensure you see the submissions and not an error.

            samhemelryk Sam Hemelryk
            leebrent Brent Lee
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Rajesh Taneja Rajesh Taneja
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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