Skip to content

Commit

Permalink
Make codechecker happy again
Browse files Browse the repository at this point in the history
  • Loading branch information
abias committed Oct 14, 2023
1 parent 2d039cb commit bf25251
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes

### Unreleased

* 2023-10-14 - Make codechecker happy again
* 2023-10-10 - Updated Moodle Plugin CI to latest upstream recommendations
* 2023-04-30 - Tests: Updated Moodle Plugin CI to use PHP 8.1 and Postgres 13 from Moodle 4.1 on.

Expand Down
16 changes: 8 additions & 8 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@
0));

// Create keepalive interval control widget.
$choices = array(1 => 1, 2 => 2, 5 => 5, 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'));
$choices = [1 => 1, 2 => 2, 5 => 5, 10 => 10, 30 => 30, 60 => 60, 90 => 90,
120 => 120, 180 => 180, 240 => 240, 300 => 300, ];
$sessionhandlingurl = new \moodle_url('/admin/settings.php', ['section' => 'sessionhandling']);
$link = \html_writer::link($sessionhandlingurl, get_string('sessionhandling', 'core_admin'));
$sessiontimeoutmin = floor(($CFG->sessiontimeout / 60));
$sessiontimeoutwarningmin = floor(($CFG->sessiontimeoutwarning / 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',
array('minutes' => $sessiontimeoutmin, 'page' => $link),
['minutes' => $sessiontimeoutmin, 'page' => $link],
true).
'<br /><br />'.
get_string('setting_keepalivetimeoutwarningnote',
'local_session_keepalive',
array('minutes' => $sessiontimeoutwarningmin, 'page' => $link),
['minutes' => $sessiontimeoutwarningmin, 'page' => $link],
true),
60,
$choices));
Expand All @@ -72,7 +72,7 @@
''));

// Create keepalive time control widgets.
$days = array('sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday');
$days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
foreach ($days as $day) {
$choices[$day] = get_string($day, 'calendar', null, false);
// Don't use string lazy loading here because the string will be directly used and
Expand All @@ -88,12 +88,12 @@
'keepalivestartmin',
get_string('setting_keepalivestart', 'local_session_keepalive', null, true),
'',
array('h' => 0, 'm' => 0)));
['h' => 0, 'm' => 0]));
$page->add(new admin_setting_configtime('local_session_keepalive/keepaliveend',
'keepaliveendmin',
get_string('setting_keepaliveend', 'local_session_keepalive', null, true),
get_string('setting_keepaliveend_desc', 'local_session_keepalive', null, true),
array('h' => 0, 'm' => 0)));
['h' => 0, 'm' => 0]));
}

// Add settings page to navigation tree.
Expand Down

0 comments on commit bf25251

Please sign in to comment.