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

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

    XMLWordPrintable

    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

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            alanfez Alan Peter Carter
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

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