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

Updating of forum grade based on ratings failing for some

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Forum, Ratings
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Submitting an ajax rating in the forum leads to the following appearing in the error log. This was reported at http://tracker.moodle.org/browse/MDLQA-162

      Default exception handler: Error reading from database Debug: ERROR: could not determine data type of parameter $1\nSELECT $1 AS id, $2 AS userid, AVG(r.rating) AS rawgrade\n FROM mdl_rating r\n JOIN mdl_forum_posts i ON r.itemid=i.id\n WHERE r.contextid=$3\n AND i.userid = $4\n[array (\n 0 => 4,\n 1 => 4,\n 2 => '122',\n 3 => 4,\n)]\n* line 378 of /lib/dml/moodle_database.php: dml_read_exception thrown\n* line 227 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()\n* line 666 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()\n* line 500 of /rating/lib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 1446 of /mod/forum/lib.php: call to rating_manager->get_user_grades()\n* line 1466 of /mod/forum/lib.php: call to forum_get_user_grades()\n* line 106 of /rating/rate_ajax.php: call to forum_update_grades()\n, referer: http://mdldev.its.waikato.ac.nz/~teresag/moodle20/mod/forum/discuss.php?d=4

      I'm running mysql and cannot reproduce this error. The above error message makes reference to pgsql_native_moodle_database.php so Teresa is presumably running Postgres.

        Attachments

          Activity

            People

            Assignee:
            andyjdavis Andrew Davis
            Reporter:
            andyjdavis Andrew Davis
            Tester:
            Nobody
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

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