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

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

      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?

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

            skodak Petr Skoda
            bushido Mark Nielsen (Inactive)
            Mathieu Petit-Clair Mathieu Petit-Clair
            Votes:
            13 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.