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

grade.php redirecting to the wrong place

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.2.7, 2.3.4
    • Component/s: Gradebook
    • Labels:
    • Testing Instructions:
      Hide

      Go to the gradebook.

      Go to the grader report and turn on editing.
      Click the edit icon for an individual student's grade.
      Click cancel and check that you're redirected without error.
      Click the edit icon again and alter the student's grade.

      Go to the categories and items screen.
      Create a new grade item (theres a "add grade item" button towards the bottom of the page)
      Click the calculator icon next to the new grade item.
      Click cancel and check you dont get an error.
      Click the calculator again and set up a calculation. http://docs.moodle.org/20/en/Grade_calculations

      Show
      Go to the gradebook. Go to the grader report and turn on editing. Click the edit icon for an individual student's grade. Click cancel and check that you're redirected without error. Click the edit icon again and alter the student's grade. Go to the categories and items screen. Create a new grade item (theres a "add grade item" button towards the bottom of the page) Click the calculator icon next to the new grade item. Click cancel and check you dont get an error. Click the calculator again and set up a calculation. http://docs.moodle.org/20/en/Grade_calculations
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
      MDL-36331_redirect

      Description

      Hi,

      I'm not a general Moodle and this isn't my normal role user so please excuse me and accept my apologies if this is my own fault... however I am currently covering our vacant e-learning position and hence am investigating any problems reported.

      One of our users told me that they were receiving a 404 error when editing some grades within our moodle.

      The errors were logged as:

      [31/Oct/2012:14:26:39 +0000] "GET /grade/report.php?id=34 HTTP/1.1" 404 509

      And then in the error log:

      script '/var/www/sites/festudio/moodle/grade/report.php' not found or unable to stat, referer: http:// ... /grade/edit/tree/grade.php?courseid=34&itemid=37&userid=485

      Within the moodle/grade/edit/tree/grade.php file (and I have checked this on a new download), lines 58-60 are:

      // default return url
      $gpr = new grade_plugin_return();
      $returnurl = $gpr->get_return_url($CFG->wwwroot.'/grade/report.php?id='.$course->id);

      However the file /grade/report.php does not exist, it also doesn't exist in the fresh installation that I downloaded so I have checked that it hasn't simply been deleted.

      I am wondering if the line should read:

      $returnurl = $gpr->get_return_url($CFG->wwwroot.'/grade/report/index.php?id='.$course->id);

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jan/13