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

3rd party Assignment types are not backed up

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9.6, 2.0
    • 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
    • Assignment (2.2)
    • None
    • Any
    • MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE
    • Moderate

      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?)

        1. corechanges.diff
          7 kB
        2. newversion.diff
          7 kB
        3. uploadpdfchanges.diff
          2 kB

            mjollnir Penny Leach (Inactive)
            davosmith Davo Smith
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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