-
Bug
-
Resolution: Duplicate
-
Blocker
-
None
-
1.9.12, 2.0
-
MySQL 5.5.8
PHP 5.3.4
-
MySQL
-
MOODLE_19_STABLE, MOODLE_20_STABLE
-
Easy
When a teacher checks on assignments in a course they see "view 1 submitted assignment" Clicking on it causes a database error.
Warning: mysqli::query() [mysqli.query]: (22003/1690): BIGINT UNSIGNED value is out of range in '(`moodle2`.`s`.`timemarked` - `moodle2`.`s`.`timemodified`)' in C:\xampp\htdocs\moodle2\lib\dml\mysqli_native_moodle_database.php on line 774
A number of "fixes" have been suggested including a mod to my.ini
I have found that a fix orginally suggested by Pino Calambrogio aimed at 1.9 worked wonders
COALESCE(SIGN(SIGN(s.timemarked) + SIGN(s.timemarked - s.timemodified)), 0) AS status ';
in the forums and you should find a discussion by Pino Calambrogio that refers to editing \mod\assignment\lib.php to this...
COALESCE(SIGN(CAST(s.timemarked as SIGNED) + SIGN(CAST(s.timemarked as SIGNED) - CAST(s.timemodified as SIGNED))), 0) AS status ';
I applied the modification in two (2) places in that file and it SEEMS to be OK now. I suspect this is a bug with the version of MySQL.
- duplicates
-
MDL-27638 Assignment Module Submissions SQL overflow
-
- Closed
-