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

Allow mod_assign to restore from mod_assignment backup files and completely remove mod_assignment

    Details

    • Testing Instructions:
      Hide
      1. Before this patch:
        1. Enable both mod_assign and mod_assignment
        2. Create lots of instance of mod_assignment (all the different types).
        3. Add some data (submission/grades) to the assignment (the more the better)
        4. Create a backup of the course with all the assignments
      1. Install this patch
        1. Upgrade your site
        2. Verify that the admin received a notice about assignments that need upgrading
        3. Verify that accessing any of the assignments gives an upgrade required message
        4. Copy the urls of the existing assignments
        5. Verify that you can upgrade the assignments using the upgrade tool
        6. Verify you can access the assignments at their previous urls
        7. Verify that the grade book and calendar link to the correct assignment instance
        8. Restore the backup file into a new course
        9. Access the course and verify that all assignments are visible and have been upgraded to mod_assign as part of the restore
        10. Verify that you cannot create new instances of the old assignment module
        11. Verify that you cannot do anything with the old assignments but upgrade, backup or delete them (or indent/outdent).
      Show
      Before this patch: Enable both mod_assign and mod_assignment Create lots of instance of mod_assignment (all the different types). Add some data (submission/grades) to the assignment (the more the better) Create a backup of the course with all the assignments Install this patch Upgrade your site Verify that the admin received a notice about assignments that need upgrading Verify that accessing any of the assignments gives an upgrade required message Copy the urls of the existing assignments Verify that you can upgrade the assignments using the upgrade tool Verify you can access the assignments at their previous urls Verify that the grade book and calendar link to the correct assignment instance Restore the backup file into a new course Access the course and verify that all assignments are visible and have been upgraded to mod_assign as part of the restore Verify that you cannot create new instances of the old assignment module Verify that you cannot do anything with the old assignments but upgrade, backup or delete them (or indent/outdent).
    • Workaround:
      1. Enable mod_assignment
      2. Restore an assignment backup
      3. Use the upgrade tool to upgrade the assignment
      4. Hide mod_assignment
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-33952-master

      Description

      If you have a site with Assignment (2.2) disabled/hidden, when somebody restores a backup with a Assignment (2.2) activity, it will show up in the restore process, saying it will be restored, etc, but when the restore is finished, it won't be available.

      If the site administrator re-enables Assignment (2.2) site-wide, it will be there, so it is restored, but to the user, it just completely disappeared with no warning.

      In my opinion, there should be a site setting that causes Assignment (2.2) activities to be automatically upgraded on restore - or at least add a warning to the user that the assignment won't be available.

      It boils down to - if a site wants to completely upgrade to the new Assignment, they run the upgrader, disable the old Assignment (2.2), the behaviour to the end-user becomes inconsistant.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  34 Vote for this issue
                  Watchers:
                  39 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/May/14