Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-13847 backup/restore issues meta
  3. MDL-8270

Full block backup/restore routine with code

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.1, 1.7.2, 1.7.3, 1.8, 1.8.1, 1.8.2, 1.8.3
    • 1.9.1
    • Blocks
    • None
    • MOODLE_17_STABLE, MOODLE_18_STABLE
    • MOODLE_19_STABLE

    Description

      The attached diffs add the following functionality to blocks:

      • Write to the backup file during the backup routine.
      • Encode links during the backup routine.
      • Restore its information written to the backup file during the restore routine.
      • Decode links during the restore routine.
      • Decode content links during restore routine.

      Basically, everything a module can do a block can do (in regards to backup/restore).

      The diffs were made off of a Moodle 1.7+ install.

      Please note that the diffs remove the block method after_restore and replaces it with a more robust instance_restore method. This method was not used by any core blocks in our 1.7+ Perhaps it was added for 3rd party blocks?

      Attachments

        1. backuplib.diff
          2 kB
        2. moodleblock.class.diff
          4 kB
        3. restorelib.diff
          10 kB
        4. 1.8.2_backup.diff
          15 kB
        5. 1.8.2_moodleblock.class.diff
          3 kB
        6. blocks_backup_19_7.patch
          18 kB

        Issue Links

          Activity

            People

              skodak Petr Skoda
              bushido Mark Nielsen
              Mathieu Petit-Clair Mathieu Petit-Clair
              Jake Dallimore, Mathew May, Mihail Geshoski
              Votes:
              13 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                15/May/08