Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…4_STABLE
  • Loading branch information...
commit b1886826de6c0cba0f0f179a8d3d27d38739c9c7 2 parents 4e63dc5 + 48410be
@stronk7 stronk7 authored
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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.