Skip to content
Browse files

Merge branch 'MDL-37539-23' of github.com:damyon/moodle into MOODLE_2…

…3_STABLE
  • Loading branch information...
2 parents 4e3f4bd + 508f42e commit 19740fe4a6dd74f528579e19a595e119a292efb3 @stronk7 stronk7 committed Jan 22, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 mod/assign/submission/comments/locallib.php
View
7 mod/assign/submission/comments/locallib.php
@@ -113,7 +113,12 @@ public function can_upgrade($type, $version) {
* @return bool was it a success? (false will trigger a rollback)
*/
public function upgrade_settings(context $oldcontext, stdClass $oldassignment, & $log) {
- // first upgrade settings (nothing to do)
+ if ($oldassignment->assignmenttype == 'upload') {
+ // Disable if allow notes was not enabled.
+ if (!$oldassignment->var2) {
+ $this->disable();
+ }
+ }
return true;
}

0 comments on commit 19740fe

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