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

SQL error shown when trying to report on participation in an activity

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.10, 2.0
    • Fix Version/s: 1.9.11, 2.0
    • Component/s: Course
    • Labels:
      None
    • Environment:
      postgres 8.3
    • Database:
      PostgreSQL
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      Throws an SQL error due to ill formed SQL

      See line 200 approx of /course/report/participation/index.php

      SELECT userid, COUNT(action) actioncount FROM

      {log} WHERE cmid = :instanceid AND time > :timefrom AND $actionsql GROUP BY userid

      should read as follows for Postgres

      SELECT userid, COUNT(action) AS actioncount FROM {log}

      WHERE cmid = :instanceid AND time > :timefrom AND $actionsql GROUP BY userid

        Gliffy Diagrams

          Activity

          Hide
          skodak Petr Skoda added a comment -

          Fixed in CVS, thanks for the report!

          Petr Skoda

          Show
          skodak Petr Skoda added a comment - Fixed in CVS, thanks for the report! Petr Skoda
          Hide
          brettwilkins Brett Wilkins added a comment -

          Hi Petr,

          This bug is also affecting the same code on MOODLE_19_STABLE.

          Cheers,
          Brett

          Show
          brettwilkins Brett Wilkins added a comment - Hi Petr, This bug is also affecting the same code on MOODLE_19_STABLE. Cheers, Brett
          Hide
          skodak Petr Skoda added a comment -

          fixed, thanks a lot!

          Show
          skodak Petr Skoda added a comment - fixed, thanks a lot!

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10