-
Functional Test
-
Minor
-
Moodle 3.3
Prerequisites
- Memcache server (localhost is fine, otherwise replace 127.0.0.1 below)
- memcached, memcache and redis php extensions
- autologinguest site setting disabled
Setup
We need to test each of them so we need repeat the steps below after setting each of the session handlers in our config.php:
- memcached session handler
- Log out if you are logged in
- Remove any config.php $CFG->session_handler_* stuff you previously added
- Paste this in your config.php before require_once...lib/setup.php
$CFG->session_handler_class = '\core\session\memcached';
$CFG->session_memcached_save_path = '127.0.0.1:11211';
$CFG->session_memcached_prefix = 'memc.sess.key.';
$CFG->session_memcached_acquire_lock_timeout = 120;
$CFG->session_memcached_lock_expire = 7200;
- memcache session handler
- Log out if you are logged in
- Remove any config.php $CFG->session_handler_* stuff you previously added
- Paste this in your config.php before require_once...lib/setup.php
$CFG->session_handler_class = '\core\session\memcache';
$CFG->session_memcache_save_path = '127.0.0.1:11211';
$CFG->session_memcache_acquire_lock_timeout = 120;
- redis session handler
- Log out if you are logged in
- Remove any config.php $CFG->session_handler_* stuff you previously added
- Paste this in your config.php before require_once...lib/setup.php
$CFG->session_handler_class = '\core\session\redis';
$CFG->session_redis_host = '127.0.0.1';
$CFG->session_redis_port = 6379; // Optional.
$CFG->session_redis_database = 0; // Optional, default is db 0.
$CFG->session_redis_prefix = 'qa.sess.'; // Optional, default is don't set one.
$CFG->session_redis_acquire_lock_timeout = 120;
$CFG->session_redis_lock_expire = 7200;
Test
- Use the CLI to run php admin/cli/purge_caches.php
- Set it up according to config-dist.php instructions (you can also check Session_handling moodle docs page)
- Log in, set browser the url to calendar/view.php press enter and press "Hide group events"
- Open a session with the same user in another browser, leave the previous browser session opened
- Set the browser url to calendar/view.php press enter, group events should be visible, press "Hide course events"
- Return to the previous session and set the browser url to calendar/view.php press enter
- Group events should be hidden and course events should be visible
- Log out (last opened session)
- Open another session with a different user
- Go to calendar/view.php and check that all event types are visible by default
- Log out (all opened sessions)
- Set http://YOURSITE/admin/index.php url in your browser, you should be redirected to the login page
- Log in as admin, you should be directed to admin/index.php
- has been marked as being related by
-
MDL-60630 Remove cachestore_memcache
-
- Closed
-