Moodle
  1. Moodle
  2. MDL-22448

Workshop log functions produces errors when a module has been updated recently under PostgreSQL

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.6, 1.9.7, 1.9.8
    • Fix Version/s: 1.9.9
    • Component/s: Workshop
    • Labels:
      None
    • Environment:
      Moodle, debugging on and student account
    • Database:
      PostgreSQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      24658

      Description

      The certificate module was updated recently and then a student logged in and got these errors in the Recent Activities Block related to the workshop logs.

      SELECT l.time, l.url, u.firstname, u.lastname, a.workshopid, a.userid, e.name FROM mdl_log l, mdl_workshop e, mdl_workshop_submissions s, mdl_workshop_assessments a, mdl_user u WHERE l.time > 1273549600 AND l.time < 1273720637 AND l.course = 2613 AND l.module = 'workshop' AND l.action = 'agree' AND a.id = l.info AND s.id = a.submissionid AND a.userid = 62 AND u.id = s.userid AND e.id = a.workshopid;
      ERROR: operator does not exist: bigint = character varying at character 306
      HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
      LINE 1: ...dule = 'workshop' AND l.action = 'agree' AND a.id = l.info A...

      Works fine with patch applied to make the where clause "a.id = l.info" cast correctly in PostgreSQL - "a.id = CAST(l.info AS INT)"

        Activity

        Hide
        David Mudrak added a comment -

        Fixed in CVS, these were the last two forgotten places where sql_cast_char2int('l.info') was not used. Thanks a lot for the patch!

        Show
        David Mudrak added a comment - Fixed in CVS, these were the last two forgotten places where sql_cast_char2int('l.info') was not used. Thanks a lot for the patch!

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: