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

3rd party Assignment types are not backed up

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4
    • Fix Version/s: 1.9.6, 2.0
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Database:
      Any
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      I have written a new assignment type (uploadpdf) which creates extra database tables which are used by both the assignments and by the submissions. There does not seem to be any way that I can 'hook in' to the backup process and get this extra data backed up at the same time as the assignment is backed up.

      I am not sure whether the best place for a fix would be in 'backup/backuplib.php' (a search for all the plugins for each module and then a check for 'backuplib' in the 'mod/MODULENAME/type/PLUGINNAME' folder), or a fix in 'mod/assignment/backuplib.php' to look for backuplib.php there.

      To clarify, I would like to be able to create a file:
      moodle/mod/assignment/type/uploadpdf/backuplib.php
      and then backup some extra data there, whilst leaving the main assignment backup code (in moodle/mod/assignment/backuplib.php) to do the backup of the 'mdl_assignment' and 'mdl_assignment_submission', as usual.

      The current result is that the file mentioned above would be ignored and no backup of the extra data would take place.

      Obviously similar hooks would be needed for restoring modules.

      I am prepared to look at creating a patch for this, if I can be given a bit of guidance on it (would it be practical to fix moodle 1.8/1.9 or would this only be included in 2.0 and above?)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    21/Oct/09