MDL-34052 assignment - Disable submission and feedback plugins based on assign type...
authorLuke Tucker <luke.tucker@netspot.com.au>
Fri, 9 Nov 2012 03:50:39 +0000 (14:20 +1030)
committerDamyon Wiese <damyon@moodle.com>
Tue, 27 Nov 2012 05:40:22 +0000 (13:40 +0800)
mod/assign/upgradelib.php

index ff6ee6d..3a19da1 100644 (file)
@@ -143,6 +143,8 @@ class assign_upgrade_manager {
                     if (!$plugin->upgrade_settings($oldcontext, $oldassignment, $log)) {
                         $rollback = true;
                     }
+                } else {
+                    $plugin->disable();
                 }
             }
             foreach ($newassignment->get_feedback_plugins() as $plugin) {
@@ -151,6 +153,8 @@ class assign_upgrade_manager {
                     if (!$plugin->upgrade_settings($oldcontext, $oldassignment, $log)) {
                         $rollback = true;
                     }
+                } else {
+                    $plugin->disable();
                 }
             }