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

Upload multiple 'Revert to draft' button redirects to wrong page

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Environment:
      Ubuntu 10.04; Chromium browser
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      In file '/mod/assignment/type/upload/assignment.class.php', in the function 'unfinalize()', the following line seems to cause a problem:

      $returnurl = "submissions.php?id={$this->cm->id}&userid=$userid&mode=$mode&offset=$offset&forcerefresh=1";

      This seems to redirect the page to a URL which still has the '&'s hard coded into it, rather than replaced by '&'. This causes the 'view all submissions' page to be displayed in the window, rather than continuing to show the 'view single submission' page.

      Suggested fix - change the line in question to:

      $returnurl = new moodle_url('/mod/assignment/submissions.php', array('id'=>$this->cm->id, 'userid'=>$userid, 'mode'=>$mode, 'offset'=>$offset, 'forcerefresh'=>1) );

        Attachments

          Activity

            People

            Assignee:
            nebgor Aparup Banerjee
            Reporter:
            davosmith Davo Smith
            Tester:
            Nobody
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

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