Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-22414 META: Restore 1.9 backups into Moodle 2.1 (phase 1)
  3. MDL-27718

Migrate files into correct filearea during the conversion

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.1
    • 2.1
    • Backup
    • None
    • MOODLE_21_STABLE
    • MOODLE_21_STABLE
    • Hide

      Thanks to the the legacy course files area, the images are actually displayed. But if the restored course or its part is backed-up again, such files are not included (or are they? I do not know to be honest. Anyway, course files must die).

      Show
      Thanks to the the legacy course files area, the images are actually displayed. But if the restored course or its part is backed-up again, such files are not included (or are they? I do not know to be honest. Anyway, course files must die).
    • Hide
      • Use a 1.9 backup file that contains images embedded in HTML editor fields and some course files are referenced (linked) from these fields, too. Course description, section summaries and module intro fields should all be supported.
      • Restore the backup in Moodle 2.1 or higher
      • TEST A: make sure that images are displayed and links to files work
      • TEST B: using either Firebug or similar extension, or by looking at the images properties and links URL, make sure that the files are linked via pluginfile.php and not file.php
      Show
      Use a 1.9 backup file that contains images embedded in HTML editor fields and some course files are referenced (linked) from these fields, too. Course description, section summaries and module intro fields should all be supported. Restore the backup in Moodle 2.1 or higher TEST A: make sure that images are displayed and links to files work TEST B: using either Firebug or similar extension, or by looking at the images properties and links URL, make sure that the files are linked via pluginfile.php and not file.php

      By default the legacy course files area is used for the files referenced from a HTML content (like images in the summary/intro fields). All references using $@FILEPHP@$ in moodle.xml will link to the legacy file.php after the restore. During the conversion, we should migrate the files into proper file areas if possible. This involves:

      • rewrite $@FILEPHP@$ with @@PLUGINFILE@@
      • migrate the referenced files so they appear in files.xml
      • write filerefs into inforef.xml

      See recently added helper method moodle1_converter::migrate_referenced_files() and its usage.

      This was already fixed in the course summary field, section summary fields and intro fields in all resource successors. The questions have the attached image converted, too.

      What must be done now is to add the conversion for intro fields in all other activity modules.

            mudrd8mz David Mudrák (@mudrd8mz)
            mudrd8mz David Mudrák (@mudrd8mz)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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