mirror of
https://github.com/moodle/moodle.git
synced 2025-03-10 10:58:38 +01:00
MDL-37539 Assignment upgrade: Disable submission comments if allow notes was not enabled.
For advanced upload of files only - this setting was stored in var2.
This commit is contained in:
parent
cf003abc92
commit
5389dfb0eb
@ -110,7 +110,12 @@ class assign_submission_comments extends assign_submission_plugin {
|
||||
* @return bool was it a success? (false will trigger a rollback)
|
||||
*/
|
||||
public function upgrade_settings(context $oldcontext, stdClass $oldassignment, & $log) {
|
||||
// No settings to upgrade.
|
||||
if ($oldassignment->assignmenttype == 'upload') {
|
||||
// Disable if allow notes was not enabled.
|
||||
if (!$oldassignment->var2) {
|
||||
$this->disable();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user