Merge branch 'MDL-30157_master-fix' of git://github.com/dmonllao/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2015-09-17 11:28:31 +02:00
commit 22e97e6413
2 changed files with 6 additions and 2 deletions

View File

@ -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:

View File

@ -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: