Permalink
Browse files

course completion: MDL-22797 Review course completion compatibility w…

…ith new enrol internals

Thanks to Iver Johnson for the patch

Also fixes MDL-23595
  • Loading branch information...
1 parent d68c337 commit fbc133e5adb593c1d2b6e3e99f85a0a0e45990bb Aaron Barnes committed Aug 3, 2010
Showing with 6 additions and 6 deletions.
  1. +3 −3 lib/completion/completion_criteria_duration.php
  2. +3 −3 lib/completion/cron.php
@@ -186,8 +186,8 @@ public function cron() {
u.id AS userid,
ue.timestart AS otimestart,
(ue.timestart + cr.enrolperiod) AS ctimestart,
- ue.timeenrolled AS otimeenrolled,
- (ue.timeenrolled + cr.enrolperiod) AS ctimeenrolled
+ ue.timecreated AS otimeenrolled,
+ (ue.timecreated + cr.enrolperiod) AS ctimeenrolled
FROM
{user} u
INNER JOIN
@@ -213,7 +213,7 @@ public function cron() {
AND
(
ue.timestart > 0 AND ue.timestart + cr.enrolperiod < ?
- OR ue.timeenrolled > 0 AND ue.timeenrolled + cr.enrolperiod < ?
+ OR ue.timecreated > 0 AND ue.timecreated + cr.enrolperiod < ?
)
';
View
@@ -78,7 +78,7 @@ function completion_cron_mark_started() {
u.id AS userid,
crc.id AS completionid,
ue.timestart,
- ue.timeenrolled
+ ue.timecreated
FROM
{user} u
INNER JOIN
@@ -102,8 +102,8 @@ function completion_cron_mark_started() {
AND u.deleted = 0
AND ue.timestart < ?
AND (ue.timeend > ? OR ue.timeend = 0)
- AND ue.timeenrolled < ?
- AND (ue.timeenrolled > ? OR ue.timeenrolled = 0)
+ AND ue.timecreated < ?
+ AND (ue.timecreated > ? OR ue.timecreated = 0)
ORDER BY
course,
userid

0 comments on commit fbc133e

Please sign in to comment.