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

XML grade import from URL completely broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.6.6, 2.7.3
    • 2.6.5, 2.7.2
    • Gradebook
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • 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.

      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.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Frédéric Massart Frédéric Massart
            Damyon Wiese Damyon Wiese
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.