* When creating custom licenses, the list of active licenses
($CFG->licenses) also needs to be updated. Same when a custom license
is being deleted.
$DB->insert_record('license', $license);
self::reset_license_cache();
+ // Update the config setting of active licenses.
+ self::set_active_licenses();
}
/**
}
}
+ // Update the config setting of active licenses as well.
+ self::set_active_licenses();
+
} else {
throw new moodle_exception('cannotdeletecore', 'license');
}