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

backup/restore from M1.9 to M2.x does not preserve linking between resources

XMLWordPrintable

    • MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • Hide

      Patch is attached.

      Show
      Patch is attached.
    • Hide

      Create backup:
      In Moodle 1.9 -
      In course file, create a folder, in it place two files, a image, and a html file that loads that image as a relative path (<img src="img.jpg>").
      On the front page of the course, and a Link to a file and link to the html file.
      Backup the course and download it.

      NOTE: I've attached a sample backup that is confirmed to exhibit the behavior, and also includes a 3 level deep folder test.

      In moodle 2.x
      Go into a course, go to restore, and add the 1.9 backup.
      You can restore into the existing course, merging, and use all the default settings, except on step "4. Schema" set overwrite course settings to Yes (this is because of a seeming bug that makes legacy files that may be needed by resources unavailable unless this is done).

      Complete the restore.

      Bad behavior:
      If you edit the resource created, you will notice that img.html is at the base level, instead of in a folder. If you were to upgrade the 1.9 site it would be in the subfolder.
      If you try and view the resource, the image will show as broken.

      Behavior after patch:
      The file structure is recreated in the resource, and when you view the resource, it will load in the image.

      Show
      Create backup: In Moodle 1.9 - In course file, create a folder, in it place two files, a image, and a html file that loads that image as a relative path (<img src="img.jpg>"). On the front page of the course, and a Link to a file and link to the html file. Backup the course and download it. NOTE: I've attached a sample backup that is confirmed to exhibit the behavior, and also includes a 3 level deep folder test. In moodle 2.x Go into a course, go to restore, and add the 1.9 backup. You can restore into the existing course, merging, and use all the default settings, except on step "4. Schema" set overwrite course settings to Yes (this is because of a seeming bug that makes legacy files that may be needed by resources unavailable unless this is done). Complete the restore. Bad behavior: If you edit the resource created, you will notice that img.html is at the base level, instead of in a folder. If you were to upgrade the 1.9 site it would be in the subfolder. If you try and view the resource, the image will show as broken. Behavior after patch: The file structure is recreated in the resource, and when you view the resource, it will load in the image.

      The backup and restore of resources from Moodle 1.9.x to Moodle 2.x does not preserve linking between resources.

      I think this patch fixes this problem.

      mk

            emerrill Eric Merrill
            bazaar Mawuli Kuivi
            Dan Poltawski Dan Poltawski
            Sam Hemelryk Sam Hemelryk
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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