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

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.1, 1.7.2, 1.7.3, 1.8, 1.8.1, 1.8.2, 1.8.3
    • Fix Version/s: 1.9.1
    • Component/s: Blocks
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE
    • Fixed Branches:
      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. 1.8.2_backup.diff
          15 kB
          Mark Nielsen
        2. 1.8.2_moodleblock.class.diff
          3 kB
          Mark Nielsen
        3. backuplib.diff
          2 kB
          Mark Nielsen
        4. blocks_backup_19_7.patch
          18 kB
          Petr Skoda
        5. moodleblock.class.diff
          4 kB
          Mark Nielsen
        6. restorelib.diff
          10 kB
          Mark Nielsen

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              bushido Mark Nielsen
              Tester:
              Mathieu Petit-Clair
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              13 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/08