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

Error Reading from Database when one uses Ratings with Discussion Forum

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.1
    • Forum, Ratings
    • None
    • PostgreSQL
    • MOODLE_21_STABLE
    • Hide

      Don't Use Ratings for the Discussion Forum

      Show
      Don't Use Ratings for the Discussion Forum
    • Hide

      Add a Forum: Standard Forum for General Use

      Ratings: Aggregate Type: Average of Ratings - or anything else

      Get Error reading from database

      Not Ratings - WORKS FINE

      Show
      Add a Forum: Standard Forum for General Use Ratings: Aggregate Type: Average of Ratings - or anything else Get Error reading from database Not Ratings - WORKS FINE

      Error Reading from Database when one uses Ratings with Discussion Forum

      Error reading from database

      More information about this error

      Debug info: ORA-00979: not a GROUP BY expression
      SELECT r.itemid, r.component, r.ratingarea, r.contextid,
      SUM(r.rating) AS aggrrating, COUNT(r.rating) AS numratings,
      ur.id, ur.userid, ur.scaleid, ur.rating AS usersrating
      FROM m_rating r
      LEFT JOIN m_rating ur ON ur.contextid = r.contextid AND
      ur.itemid = r.itemid AND
      ur.component = r.component AND
      ur.ratingarea = r.ratingarea AND
      ur.userid = :o_userid
      WHERE r.contextid = :o_contextid AND
      r.itemid = :o_param9 AND
      r.component = :o_component AND
      r.ratingarea = :o_ratingarea
      GROUP BY r.itemid, r.component, r.ratingarea, r.contextid, ur.id, ur.userid, ur.scaleid
      ORDER BY r.itemid
      [array (
      'o_userid' => '77',
      'o_contextid' => '162',
      'o_param9' => '34',
      'o_component' => 'mod_forum',
      'o_ratingarea' => 'post',
      )]
      Stack trace:
      line 393 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 268 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
      line 1070 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
      line 585 of /rating/lib.php: call to oci_native_moodle_database->get_records_sql()
      line 5469 of /mod/forum/lib.php: call to rating_manager->get_ratings()
      line 271 of /mod/forum/discuss.php: call to forum_print_discussion()

            andyjdavis Andrew Davis
            cpduggan Cindy Duggan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.