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

Problem with rating submission using simple forums

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.1
    • Fix Version/s: None
    • Component/s: Forum
    • Labels:
      None
    • Environment:
      All

      Description

      Hi, there seems to be a bug in the submission of ratings for the forums using the view.php file rather than discuss.php. Specifically, in the rate.php file located in:

      moodle/mod/forum/rate.php

      On line 21, the following checks only for discuss.php:

      if ($data = data_submitted($CFG->wwwroot/mod/forum/discuss.php)) {

      In order to resolve this bug for my system, I used the following code using ereg:

      /**

      • ecarter – ratings can come from either discuss.php or
      • view.php in simple forums. Need to check for them..

      */

      if (ereg((.+\.php)?.*$,

      basename($HTTP_REFERER),

      $matches))

      { $filename = $matches[1]; }

      if ($data = data_submitted($CFG->wwwroot/mod/forum/ . $filename)) {

      // form submitted

      Hope that's helpful. I did check to see if the same issue would be a problem in Moodle 1.2 as we're planning on upgrading soon. Seems that it is not resolved in that release from what I can tell.

      Eric

        Gliffy Diagrams

          Activity

          Hide
          dougiamas Martin Dougiamas added a comment -

          From Martin Dougiamas (martin at moodle.com) Thursday, 25 March 2004, 01:40 PM:

          Thanks! Fixed in 1.2.1

          Show
          dougiamas Martin Dougiamas added a comment - From Martin Dougiamas (martin at moodle.com) Thursday, 25 March 2004, 01:40 PM: Thanks! Fixed in 1.2.1
          Hide
          mblake Michael Blake added a comment -

          assign to a valid user

          Show
          mblake Michael Blake added a comment - assign to a valid user

            People

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

              Dates

              • Created:
                Updated:
                Resolved: