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

Uploaded assignments are not shown to teacher

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • 1.9.10
    • Assignment (2.2)
    • None
    • Suse Linux 10.3
      Lampp 7.4
    • MySQL
    • MOODLE_19_STABLE

      This week (14 Feb 11)I upgraded to actual release 1.9.10.
      I use a lampp environment and also upgraded from lampp1.7.0 to 1.7.4

      Afterwards teachers could not see uploaded assignments any more.
      When clicking on the assignment, I can see "View 21 uploaded assignments"
      When clicking on this link the new page says:"Nothing to display".

      I switched on debuggingmessages in Moodle
      and got the message:
      BIGINT UNSIGNED value is out of range in '(`moodle`.`s`.`timemarked` - `moodle`.`s`.`timemodified`)'

      SELECT u.id, u.firstname, u.lastname, u.picture, u.imagealt, 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 = 195 WHERE u.id IN (1432,1242,1341,1245,1285,1270,1271,1307,1246,1240,1254,1310,1252,1435,1250,1267,1308,1258,1260,1298,1266,1259,1275,1387,1391,1268,1295) ORDER BY lastname ASC

      • line 686 of lib/dmllib.php: call to debugging()
      • line 966 of lib/dmllib.php: call to get_recordset_sql()
      • line 1186 of mod/assignment/lib.php: call to get_records_sql()
      • line 524 of mod/assignment/lib.php: call to assignment_base->display_submissions()
      • line 43 of mod/assignment/submissions.php: call to assignment_base->submissions()

      Playing a bit with phpMyadmin I got the following values for timemarked and timemodified
      timemarked timemodified
      0 1297868046
      0 1297886884
      NULL NULL
      0 1297793028
      0 1297874405
      0 1297882318
      0 1297797923
      0 1297361972
      0 1297788713
      0 1297874030
      0 1297896379
      NULL NULL
      NULL NULL
      0 1297697608
      0 1297701961
      0 1297876458
      0 1297516949
      NULL NULL
      0 1297794067
      NULL NULL
      0 1297868094
      0 1297794223
      0 1297890846
      0 1297705068
      0 1297870591
      NULL NULL
      0 1297873283
      *************************************************

      I assume that the mysql in lampp1.7.4 is more strict than the mysql in lampp 1.7.0

      Proposed solution:
      in moodle/mod/assignment/lib.php line 1186
      change
      //********************** OLD
      $select = 'SELECT u.id, u.firstname, u.lastname, u.picture, u.imagealt,
      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 ';
      //**********************

      to
      //********************** NEW
      $select = 'SELECT u.id, u.firstname, u.lastname, u.picture, u.imagealt,
      s.id AS submissionid, s.grade, s.submissioncomment,
      s.timemodified, s.timemarked,
      COALESCE(SIGN(SIGN(s.timemarked) + SIGN(CAST(s.timemarked AS SIGNED) - CAST(s.timemodified AS SIGNED))), 0) AS status ';
      //**********************

      Best regards
      Klaus

            moodle.com Moodle HQ
            klaus.mueller Klaus Müller (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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