Fix get_course_time() allowing users to view certificate early (#403)

This commit is contained in:
Mark Nelson 2021-04-05 19:50:39 +08:00
parent 2e58b24daa
commit 22081dffb0
2 changed files with 3 additions and 2 deletions

View file

@ -9,10 +9,11 @@ Note - All hash comments refer to the issue number. Eg. #169 refers to https://g
### Added
- Usage of github actions (#407).
- The ability to show the description on the course page (#406).
- The ability to choose how to deliver the certificate (#401)
- The ability to choose how to deliver the certificate (#401).
### Fixed
- Managers are now able to download their students' certificates (#412).
- Users being able to view the certificate before the required time set (#403).
## [3.8.5] - 2020-11-26

View file

@ -227,7 +227,7 @@ class certificate {
$totaltime = 0;
}
$delay = $log->$timefield - $lasthit;
if ($delay > ($CFG->sessiontimeout * 60)) {
if ($delay > $CFG->sessiontimeout) {
// The difference between the last log and the current log is more than
// the timeout Register session value so that we have found a session!
$login = $log->$timefield;