1.9.12, 2.0.3, 2.1
MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
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.
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`)'
s.id AS submissionid, s.grade, s.submissioncomment,
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
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()
- log in as an admin
- create a new assignment within a course
- log in as a student and submit and assignment
- log back in as the admin
- view the assignment and click View submissions
- Ensure you see the submissions and not an error.