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

Recent course activity page outputs an error when filtering by group

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.0.9, 2.1.6, 2.2.3
    • Component/s: Course
    • Labels:
      None
    • Testing Instructions:
      Hide

      Testing difficulty: easy

      Follow the steps to reproduce provided by the reporter:

      1. Have a course with some groups and the workshop included
      2. Visit the recent course activity page and filter by group
      3. TEST: Make sure no SQL exception is thrown

      Show
      Testing difficulty: easy Follow the steps to reproduce provided by the reporter: 1. Have a course with some groups and the workshop included 2. Visit the recent course activity page and filter by group 3. TEST: Make sure no SQL exception is thrown
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-32718-sql-typo

      Description

      Recent course activity page outputs the following error when filtering by group

      Debug info: Unknown column 'authorgroumembership.userid' in 'on clause'
      SELECT s.id AS submissionid, s.title AS submissiontitle, s.timemodified AS submissionmodified,
      author.id AS authorid, author.lastname AS authorlastname, author.firstname AS authorfirstname,
      author.picture AS authorpicture, author.imagealt AS authorimagealt, author.email AS authoremail,
      a.id AS assessmentid, a.timemodified AS assessmentmodified,
      reviewer.id AS reviewerid, reviewer.lastname AS reviewerlastname, reviewer.firstname AS reviewerfirstname,
      reviewer.picture AS reviewerpicture, reviewer.imagealt AS reviewerimagealt, reviewer.email AS revieweremail
      FROM mdl_workshop_submissions s
      INNER JOIN mdl_workshop w ON s.workshopid = w.id
      INNER JOIN mdl_user author ON s.authorid = author.id
      LEFT JOIN mdl_workshop_assessments a ON a.submissionid = s.id
      LEFT JOIN mdl_user reviewer ON a.reviewerid = reviewer.id
      LEFT JOIN mdl_groups_members authorgroupmembership ON authorgroumembership.userid = author.id
      LEFT JOIN mdl_groups_members reviewergroupmembership ON reviewergroumembership.userid = reviewer.id
      WHERE w.id = ?
      AND s.example = 0
      AND (authorgroupmembership.groupid = ? OR reviewergroupmembership.groupid = ?)
      AND (s.timemodified > ? OR a.timemodified > ?)
      ORDER BY s.timemodified ASC, a.timemodified ASC
      [array (
      0 => '1',
      1 => '2',
      2 => '2',
      3 => 830834400,
      4 => 830834400,
      )]
      Stack trace:

      line 413 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 829 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 618 of /mod/workshop/lib.php: call to mysqli_native_moodle_database->get_recordset_sql()
      line 176 of /course/recent.php: call to workshop_get_recent_mod_activity()

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/12