For advanced upload of files only - this setting was stored in var2.
* @return bool was it a success? (false will trigger a rollback)
*/
public function upgrade_settings(context $oldcontext, stdClass $oldassignment, & $log) {
* @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();
+ }
+ }