Skip to content

Commit

Permalink
Merge pull request #5617 from christianbeeznest/ofaj-21820
Browse files Browse the repository at this point in the history
Internal: Fix session visibility for exercises without start date - refs BT#21820
  • Loading branch information
christianbeeznest authored Jun 26, 2024
2 parents a92ac86 + 4d0b457 commit 11fe93a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/main/inc/lib/api.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 11fe93a

Please sign in to comment.