mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-30157 enrol_manual: timestart a few seconds before
We want to prevent conflicts with get_enrolled_sql trick for db caching plus users should be able to access the course once enrolled.
This commit is contained in:
parent
8c55a50dba
commit
ba523bf5c3
@ -140,7 +140,9 @@ switch ($action) {
|
||||
$timestart = $course->startdate;
|
||||
break;
|
||||
case 4:
|
||||
$timestart = time();
|
||||
// We mimic get_enrolled_sql round(time(), -2) but always floor as we want users to always access their
|
||||
// courses once they are enrolled.
|
||||
$timestart = intval(substr(time(), 0, 8) . '00') - 1;
|
||||
break;
|
||||
case 3:
|
||||
default:
|
||||
|
@ -119,7 +119,9 @@ if ($canenrol && optional_param('add', false, PARAM_BOOL) && confirm_sesskey())
|
||||
$timestart = $course->startdate;
|
||||
break;
|
||||
case 4:
|
||||
$timestart = $now;
|
||||
// We mimic get_enrolled_sql round(time(), -2) but always floor as we want users to always access their
|
||||
// courses once they are enrolled.
|
||||
$timestart = intval(substr($now, 0, 8) . '00') - 1;
|
||||
break;
|
||||
case 3:
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user