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

Course Import does not import Legacy Course Files

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Using the legacy-file.mbz
      #Restore into a new course.
      #Confirm Legacy course files shows up, and contains Eris.jpg
      #Create a new course
      #Restore into current course - Overwrite course config: No
      #Confirm Legacy course files shows up, and contains Eris.jpg
      #Create a new course
      #Restore over current course (deleting first) - Overwrite course config: No
      #Confirm Legacy course files shows up, and contains Eris.jpg
      #Create a new course
      #Do an import from one of the previous courses.
      #Confirm Legacy course files shows up, and contains Eris.jpg

      Using the no-legacy-file.mbz
      #Restore into a new course.
      #Confirm Legacy course files does not shows up
      #Restore into current course - Overwrite course config: No
      #Confirm Legacy course files does not shows up
      #Restore over current course (deleting first) - Overwrite course config: No
      #Confirm Legacy course files does not shows up
      #Do an import from one of the previous courses without legacy files.
      #Confirm Legacy course files does not shows up

      Test on demand migration of imported course.

      1. Restore legacy-file.mbz into a new course.
      2. Create a new page activity in the course.
      3. Update the page activity in the database:

        update mdl_page set legacyfiles = 2, content='<img src="@@PLUGINFILE@@/Eris.jpg" />' where id = XXX;
        

      4. Do not look at the page activity - go directly to a different course
      5. Import the legacy-file course with the page activity.
      6. View the page activity and verify that the image is not broken.
      Show
      Using the legacy-file.mbz #Restore into a new course. #Confirm Legacy course files shows up, and contains Eris.jpg #Create a new course #Restore into current course - Overwrite course config: No #Confirm Legacy course files shows up, and contains Eris.jpg #Create a new course #Restore over current course (deleting first) - Overwrite course config: No #Confirm Legacy course files shows up, and contains Eris.jpg #Create a new course #Do an import from one of the previous courses. #Confirm Legacy course files shows up, and contains Eris.jpg Using the no-legacy-file.mbz #Restore into a new course. #Confirm Legacy course files does not shows up #Restore into current course - Overwrite course config: No #Confirm Legacy course files does not shows up #Restore over current course (deleting first) - Overwrite course config: No #Confirm Legacy course files does not shows up #Do an import from one of the previous courses without legacy files. #Confirm Legacy course files does not shows up Test on demand migration of imported course. Restore legacy-file.mbz into a new course. Create a new page activity in the course. Update the page activity in the database: update mdl_page set legacyfiles = 2, content='<img src="@@PLUGINFILE@@/Eris.jpg" />' where id = XXX; Do not look at the page activity - go directly to a different course Import the legacy-file course with the page activity. View the page activity and verify that the image is not broken.
    • Workaround:
      Hide

      Instead of importing, make the backup of the required resources in the source course and restore it inside the target course. The backup / restore process (on contrary to the import process) does transfer the Legacy course files area so the on-demand-migration works.

      Show
      Instead of importing, make the backup of the required resources in the source course and restore it inside the target course. The backup / restore process (on contrary to the import process) does transfer the Legacy course files area so the on-demand-migration works.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull Master Branch:

      Description

      A course that is upgrade from 1.9 to 2.0 will contain a Legacy Course Files area which is necessary for the "on-the-fly" migration of files into a resource (for example, HTML mini sites). A backup/restore of such a course will correctly include the Legacy Course Files section. However, doing an Import of a course does not give the ability to migrate the Legacy Course Files. This means that resources end up with broken links because it can't continue the live migration as files are accessed.

      This is a significant issue since some users will rely heavily on the Import tool to move content from their upgraded 1.9 courses into new 2011 courses.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                50 Vote for this issue
                Watchers:
                43 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/May/13