Skip to content
Browse files

MDL-34052 assignment - Disable submission and feedback plugins based …

…on assign type when upgrading
  • Loading branch information...
1 parent f441ec2 commit 42e0a59d5b5206ea5550d23ec5045d655ea3ae76 @luke-tucker luke-tucker committed with damyon Nov 9, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 mod/assign/upgradelib.php
View
4 mod/assign/upgradelib.php
@@ -134,6 +134,8 @@ public function upgrade_assignment($oldassignmentid, & $log) {
if (!$plugin->upgrade_settings($oldcontext, $oldassignment, $log)) {
$rollback = true;
}
+ } else {
+ $plugin->disable();
}
}
foreach ($newassignment->get_feedback_plugins() as $plugin) {
@@ -142,6 +144,8 @@ public function upgrade_assignment($oldassignmentid, & $log) {
if (!$plugin->upgrade_settings($oldcontext, $oldassignment, $log)) {
$rollback = true;
}
+ } else {
+ $plugin->disable();
}
}

0 comments on commit 42e0a59

Please sign in to comment.
Something went wrong with that request. Please try again.