MDL-53566 core: Add support for context locking

This chagne adds support for a new feature known as Context Locking.
This allows a context to be locked, thereby removing all write
capabilities for all users (including admin) for that context, and all
child contexts.
This commit is contained in:
Andrew Nicols
2018-11-13 21:17:40 +08:00
parent 208950cff0
commit 0616f045c3
16 changed files with 524 additions and 61 deletions
@@ -132,6 +132,9 @@ abstract class advanced_testcase extends base_testcase {
self::resetAllData(true);
}
// Reset context cache.
context_helper::reset_caches();
// make sure test did not forget to close transaction
if ($DB->is_transaction_started()) {
self::resetAllData();