Moodle
  1. Moodle
  2. MDL-25053

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
    • Rank:
      1339

      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

        Activity

        Hide
        Petr Škoda added a comment -

        Fixed in CVS, thanks for the report!

        Petr Skoda

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

        Hi Petr,

        This bug is also affecting the same code on MOODLE_19_STABLE.

        Cheers,
        Brett

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

        fixed, thanks a lot!

        Show
        Petr Škoda added a comment - fixed, thanks a lot!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: