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

forum_get_participants references a non-existent table

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.5
    • Component/s: Forum
    • Labels:
      None
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      This code doesnt actually appear to be executed anywhere in Moodle so testing is hard. Just verify that the forums still work. Create a forum, post in it then reply to that post.

      Show
      This code doesnt actually appear to be executed anywhere in Moodle so testing is hard. Just verify that the forums still work. Create a forum, post in it then reply to that post.
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      The following query appears in the function forum_get_participants in /mod/forum/lib.php

      $st_ratings = $DB->get_records_sql("SELECT DISTINCT u.id, u.id
      FROM

      {user}

      u,

      {forum_discussions}

      d,

      {forum_posts}

      p,

      {ratings}

      r
      WHERE d.forum = ? AND
      p.discussion = d.id AND
      r.post = p.id AND
      u.id = r.userid", array($forumid));

      From what I can tell, the ratings table does not exist. There is a rating table, but it does not have a column named post.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Oct/11