Skip to content

Commit

Permalink
Screen Idle Time-Out | Timer value issue (#3297)
Browse files Browse the repository at this point in the history
* Screen Idle time out - Timer Issue

* adding 5 minute warning timer
  • Loading branch information
dtiwarATS authored Mar 3, 2023
1 parent 4b8e811 commit a6ef9c0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion assets/src/apps/delivery/Delivery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Delivery: React.FC<DeliveryProps> = ({
}
console.log({ screenIdleTimeOutInSeconds });

const screenIdleWarningTime = screenIdleTimeOutInSeconds * 1000 - 60000;
const screenIdleWarningTime = screenIdleTimeOutInSeconds * 1000 - 300000;
useEffect(() => {
//if it's preview mode, we don't need to do anything
if (!screenIdleExpirationTime || previewMode) {
Expand Down
4 changes: 2 additions & 2 deletions assets/src/apps/delivery/layouts/deck/IdleTimeOutDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const ScreenIdleTimeOutDialog: React.FC<any> = () => {
useEffect(() => {
const timer = setTimeout(() => {
handleSessionExpire();
}, 60000);
}, 300000);
return () => clearTimeout(timer);
}, []);

Expand All @@ -54,7 +54,7 @@ const ScreenIdleTimeOutDialog: React.FC<any> = () => {
<div className="type"></div>
<div className="message">
<p>
Your session will timeout in <b>1 minutes</b>. You want to continue?
Your session will timeout in <b>5 minutes</b>. You want to continue?
</p>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ config :oli,
],
payment_provider: System.get_env("PAYMENT_PROVIDER", "none"),
node_js_pool_size: String.to_integer(System.get_env("NODE_JS_POOL_SIZE", "2")),
screen_idle_timeout_in_seconds: String.to_integer(System.get_env("SCREEN_IDLE_TIMEOUT_IN_SECONDS", "180"))
screen_idle_timeout_in_seconds:
String.to_integer(System.get_env("SCREEN_IDLE_TIMEOUT_IN_SECONDS", "1800"))

rule_evaluator_provider =
case System.get_env("RULE_EVALUATOR_PROVIDER") do
Expand Down
2 changes: 1 addition & 1 deletion config/releases.exs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ config :oli,
favicons: System.get_env("BRANDING_FAVICONS_DIR", "/favicons")
],
node_js_pool_size: String.to_integer(System.get_env("NODE_JS_POOL_SIZE", "2")),
screen_idle_timeout_in_seconds: String.to_integer(System.get_env("SCREEN_IDLE_TIMEOUT_IN_SECONDS", "120"))
screen_idle_timeout_in_seconds: String.to_integer(System.get_env("SCREEN_IDLE_TIMEOUT_IN_SECONDS", "1800"))

default_description = """
The Open Learning Initiative enables research and experimentation with all aspects of the learning experience.
Expand Down
2 changes: 1 addition & 1 deletion lib/oli_web/controllers/page_delivery_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ defmodule OliWeb.PageDeliveryController do
:transition
),
screenIdleTimeOutInSeconds:
String.to_integer(System.get_env("SCREEN_IDLE_TIMEOUT_IN_SECONDS", "240"))
String.to_integer(System.get_env("SCREEN_IDLE_TIMEOUT_IN_SECONDS", "1800"))
},
bib_app_params: %{
bibReferences: context.bib_revisions
Expand Down

0 comments on commit a6ef9c0

Please sign in to comment.