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

Problems with MySQL 5.5.8 and viewing assignments

XMLWordPrintable

    • 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.

            Votes:
            10 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

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