diff --git a/CHANGES.md b/CHANGES.md index 23760a4..2bee3c5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Changes ### Unreleased +* 2017-05-19 - Bugfix: String in language pack didn't work for Moodle installed in subdirectories - Credits to David Mudrák * 2017-05-29 - Add Travis CI support ### v3.2-r2 diff --git a/lang/en/local_session_keepalive.php b/lang/en/local_session_keepalive.php index 4b27508..8c2c2af 100644 --- a/lang/en/local_session_keepalive.php +++ b/lang/en/local_session_keepalive.php @@ -34,7 +34,7 @@ $string['setting_keepaliveend_desc'] = 'With these two settings, you can control the daytime (relating to server time) when session keepalive should be active. If you set both settings to 0:00, session keepalive will be active during the whole day which is also the default. However, if you are sure that you will only want session keepalive during a defined time slot, you can limit session keepalive to this time slot to save the load on the server side during the rest of the day.'; $string['setting_keepaliveinterval'] = 'Keepalive interval'; $string['setting_keepaliveinterval_desc'] = 'With this setting, you can set the interval (in minutes) in which the users\' browsers will check for unsent user input and keep the session alive if needed. Even if this request is very lightweight on the server side, you shouldn\'t set the interval shorter as necessary because unnecessary short intervals, together with a large amount of concurrent active users, might generate perceivable additional load on your server. For normal Moodle setups, the default setting should be fine.
-The interval is best set to half of the session timeout configured in the session handling configuration page (currently set to {$a} minutes). Example: If the session timeout is set to 120 minutes, set the keepalive time to 60 minutes. The users\' browsers will then perform the first keepalive request 60 minutes after the page load which is still plenty of time before the session normally expires.'; +The interval is best set to half of the session timeout configured on the {$a->page} configuration page (currently set to {$a->minutes} minutes). Example: If the session timeout is set to 120 minutes, set the keepalive time to 60 minutes. The users\' browsers will then perform the first keepalive request 60 minutes after the page load which is still plenty of time before the session normally expires.'; $string['setting_keepalivestart'] = 'Keepalive start time'; $string['setting_keepaliveweekdays'] = 'Keepalive weekdays'; $string['setting_keepaliveweekdays_desc'] = 'With this setting, you can control the weekdays when session keepalive should be active. By default, all weekdays are enabled. However, if you are sure that you will never need session keepalive on weekends or certain working days, you can disable these weekdays to save the load on the server side on these days.'; diff --git a/settings.php b/settings.php index a049f81..dd5c8cd 100644 --- a/settings.php +++ b/settings.php @@ -46,9 +46,15 @@ // Create keepalive interval control widget. $choices = array(10 => 10, 30 => 30, 60 => 60, 90 => 90, 120 => 120, 180 => 180, 240 => 240, 300 => 300); + $sessionhandlingurl = new \moodle_url('/admin/settings.php', array('section' => 'sessionhandling')); + $link = \html_writer::link($sessionhandlingurl, get_string('sessionhandling', 'core_admin')); + $sessiontimeoutmin = ($CFG->sessiontimeout / 60); $page->add(new admin_setting_configselect('local_session_keepalive/keepaliveinterval', get_string('setting_keepaliveinterval', 'local_session_keepalive', null, true), - get_string('setting_keepaliveinterval_desc', 'local_session_keepalive', ($CFG->sessiontimeout / 60), true), + get_string('setting_keepaliveinterval_desc', + 'local_session_keepalive', + array('minutes' => $sessiontimeoutmin, 'page' => $link), + true), 60, $choices)); unset($choices);