-
Bug
-
Resolution: Fixed
-
Blocker
-
2.4.3
-
MOODLE_24_STABLE
-
MOODLE_25_STABLE
-
wip-
MDL-39312-m25 -
Moderate
-
If you create a new file locking plugin, it does not seem to appear in the interface.
Steps to reproduce:
1. Create plugin in normal way (put contents of attached zip file into /cache/locks/nolock folder within Moodle code base, so that there is a file /cache/nolocks/nolock/lib.php).
2. Visit admin page to update. Note that the new plugin is updated and recognised.
3. Go to the cache administration page (Plugins/Caching/Configuration).
EXPECTED: The new lock type should be shown under 'Summary of cache lock instances'.
BEFORE FIX: Only default locking is shown.
4. Next to 'File cache', click 'Add instance'. Try the 'Lock method' dropdown.
EXPECTED: The new lock type should be shown as an option.
BEFORE FIX: Only default locking is shown.
As a workaround, you can manually edit this file:
(dataroot)/muc/config.php
Add the following section to the locks array at the end:
'cachelock_nolock' =>
|
array (
|
'name' => 'cachelock_nolock',
|
'type' => 'cachelock_nolock',
|
'dir' => 'filelocks',
|
'default' => false,
|
),
|
After this it will now work (although it doesn't use the lang string from the lock plugin...)