From 0c945bb9ed9a2ec2f118f55e0d42c01335ef6bf7 Mon Sep 17 00:00:00 2001 From: AndrewPoppe Date: Wed, 26 Jun 2024 21:13:19 -0400 Subject: [PATCH] Update display of project-level timeout --- config.json | 2 +- src/settings.php | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config.json b/config.json index 5718fd9..47d1fce 100644 --- a/config.json +++ b/config.json @@ -138,7 +138,7 @@ "links": { "project": [ { - "name": "REDCapPRO", + "name": "REDCapPRO", "key": "redcappro", "icon": "images/fingerprint_2.png", "url": "src/home.php", diff --git a/src/settings.php b/src/settings.php index 585c62a..d0200b3 100644 --- a/src/settings.php +++ b/src/settings.php @@ -98,6 +98,9 @@ // Validate Timeout Time if ( $showTimeoutTimeSetting ) { $new_settings["timeout-time"] = (int) $post_settings["timeout-time"]; + if ( $new_settings["timeout-time"] === 0 ) { + $new_settings["timeout-time"] = $projectSettings->getSystemTimeoutMinutes(); + } if ( $new_settings["timeout-time"] < 1 ) { $timeout_time_err = "Timeout time must be a positive integer"; $any_err = true; @@ -240,14 +243,14 @@ class="form-check-input Enter the number of minutes of inactivity before participant is logged out "> + value="getProjectTimeoutMinutes($project_id)); ?>"> -

- The maximum timeout time allowed on this system is getMaximumTimeoutMinutes()) ?> minutes. -

+

Leave this value blank to set to the system default of getSystemTimeoutMinutes())?> minutes. +
+ The maximum timeout time allowed on this system is getMaximumTimeoutMinutes()) ?> minutes.