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

IMSCC restore doesn't use configured temp directory

    XMLWordPrintable

Details

    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • master-MDL-64290-imscc-restore-temp-dir
    • Easy
    • Hide
      1. Edit config.php and set $CFG->tempdir to something other than the default location, (e.g. /[path/to/the/folder/that/contains/moodledata]/moodletemp/). Make sure this folder exists.
      2. Log in as an admin and go to "Site administration / Courses / Restore course"
      3. Restore the attached ims-common-cartridge-test-export.imscc to a new course.
      4. Confirm that you are able to successfully restore this backup file to a course.
      Show
      Edit config.php and set $CFG->tempdir to something other than the default location, (e.g. / [path/to/the/folder/that/contains/moodledata] /moodletemp/). Make sure this folder exists. Log in as an admin and go to " Site administration / Courses / Restore course " Restore the attached ims-common-cartridge-test-export.imscc to a new course. Confirm that you are able to successfully restore this backup file to a course.

    Description

      If a Moodle site has set $CFG->tempdir set to something other than the default location, restoring an imscc file fails with error "The selected file is not a valid Moodle backup file and can't be restored." This is because in backup/converter/imscc1/lib.php and backup/converter/imscc11/lib.php the path is hard coded to

      $CFG->dataroot . '/temp/backup/' . $tempdir;

      Steps to reproduce:

      1.  Set Set $CFG->tempdir to something other than the default location, such as, /moodletemp/
      2. Create an imscc backup on the Moodle site or upload an already created one.
      3. Attempt to restore the imscc file.

      I will create fix on a branch in github.

       

      Attachments

        Activity

          People

            mspall Michael Spall
            mspall Michael Spall
            Damyon Wiese Damyon Wiese
            Jun Pataleta Jun Pataleta
            Janelle Barcega Janelle Barcega
            Darko Miletic, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              14/Jan/19

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 31 minutes
                31m