Skip to content

Commit dfcc92b

Browse files
committed
Quiz: #fix date format to string for exercise expiration - refs BT#22834
1 parent d0d4059 commit dfcc92b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

public/main/exercise/exercise_submit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@
608608
}
609609
}
610610
} else {
611-
$clock_expired_time = $_SESSION['expired_time'][$current_expired_time_key];
611+
$clock_expired_time = $_SESSION['expired_time'][$current_expired_time_key]->format('Y:m:d H:i:s');
612612
}
613613
}
614614

public/main/inc/lib/exercise.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1712,7 +1712,7 @@ public static function exercise_time_control_is_valid(Exercise $exercise, $lp_id
17121712
if (isset($_SESSION['expired_time'][$current_expired_time_key])) {
17131713
$current_time = time();
17141714
$expired_time = api_strtotime(
1715-
$_SESSION['expired_time'][$current_expired_time_key],
1715+
$_SESSION['expired_time'][$current_expired_time_key]->format('Y:m:d H:i:s'),
17161716
'UTC'
17171717
);
17181718
$total_time_allowed = $expired_time + 30;

0 commit comments

Comments
 (0)