Skip to content

Commit

Permalink
Merge branch 'MDL-30157_master-fix' of git://github.com/dmonllao/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Sep 17, 2015
2 parents 8c55a50 + ba523bf commit 22e97e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion enrol/manual/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@
$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:
Expand Down
4 changes: 3 additions & 1 deletion enrol/manual/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@
$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:
Expand Down

0 comments on commit 22e97e6

Please sign in to comment.