Merge pull request #5617 from christianbeeznest/ofaj-21820

Internal: Fix session visibility for exercises without start date - refs BT#21820
pull/5618/head
christianbeeznest 1 year ago committed by GitHub
commit 11fe93a942
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      public/main/inc/lib/api.lib.php

@ -2562,6 +2562,9 @@ function api_get_session_visibility(
// If start date was set.
if (!empty($row['access_start_date'])) {
$visibility = $now > api_strtotime($row['access_start_date'], 'UTC') ? SESSION_AVAILABLE : SESSION_INVISIBLE;
} else {
// If there's no start date, assume it's available until the end date
$visibility = SESSION_AVAILABLE;
}
// If the end date was set.

Loading…
Cancel
Save