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

XML grade import from URL completely broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.6.5, 2.7.2
    • Fix Version/s: 2.6.6, 2.7.3
    • Component/s: Gradebook
    • Labels:
    • Testing Instructions:
      Hide

      You need a course with a gradebook with some grades.

      1. Make sure that some of the grade items, and some of the users in the course have an idnumber set.
      2. Export those grades as XML format.
      3. Put that XML file on web server, so you can download it with a URL.
      4. Grade -> Import -> XML
      5. Put the URL of the XML file in the Remote file URL box.
      6. Click the Upload grades button.

      Verify that it works, or that failing that, you get a sensible error message.

      This requires you to put an XML file exported from Moodle on a server somewhere where it can be downloaded with a URL.

      Pass MDL-48008 if this passes, as they are covered by the same instructions.

      Show
      You need a course with a gradebook with some grades. Make sure that some of the grade items, and some of the users in the course have an idnumber set. Export those grades as XML format. Put that XML file on web server, so you can download it with a URL. Grade -> Import -> XML Put the URL of the XML file in the Remote file URL box. Click the Upload grades button. Verify that it works, or that failing that, you get a sensible error message. This requires you to put an XML file exported from Moodle on a server somewhere where it can be downloaded with a URL. Pass MDL-48008 if this passes, as they are covered by the same instructions.
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      One bit of the code does

      $url  = required_param('url', PARAM_URL); // only real urls here
      // ...
      $text = download_file_content($url);
      

      Unforunately, in the ... bit in the middle, we get this:

      $url = new moodle_url('/grade/import/xml/import.php', array('id' => $id,'url' => $url));
      if ($feedback !== 0) {
          $url->param('feedback', $feedback);
      }
      $PAGE->set_url($url);
      

      So that corrupts the URL and it does not work.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Nov/14