MDL-33398 Cron: fix wrong variable type in completion criterias
authorFrederic Massart <fred@moodle.com>
Thu, 31 May 2012 02:19:15 +0000 (10:19 +0800)
committerDan Poltawski <dan@moodle.com>
Thu, 31 May 2012 04:50:38 +0000 (12:50 +0800)
lib/completion/completion_criteria_course.php
lib/completion/completion_criteria_date.php
lib/completion/completion_criteria_grade.php

index 671eeb9..a25dea2 100644 (file)
@@ -194,7 +194,7 @@ class completion_criteria_course extends completion_criteria {
         $rs = $DB->get_recordset_sql($sql);
         foreach ($rs as $record) {
             $completion = new completion_criteria_completion((array) $record, DATA_OBJECT_FETCH_BY_KEY);
-            $completion->mark_complete($record['timecompleted']);
+            $completion->mark_complete($record->timecompleted);
         }
         $rs->close();
     }
index 1d52e29..baecc20 100644 (file)
@@ -180,7 +180,7 @@ class completion_criteria_date extends completion_criteria {
         $rs = $DB->get_recordset_sql($sql, array(time()));
         foreach ($rs as $record) {
             $completion = new completion_criteria_completion((array) $record, DATA_OBJECT_FETCH_BY_KEY);
-            $completion->mark_complete($record['timeend']);
+            $completion->mark_complete($record->timeend);
         }
         $rs->close();
     }
index 22a924f..6bc32ed 100644 (file)
@@ -216,7 +216,7 @@ class completion_criteria_grade extends completion_criteria {
         $rs = $DB->get_recordset_sql($sql);
         foreach ($rs as $record) {
             $completion = new completion_criteria_completion((array) $record, DATA_OBJECT_FETCH_BY_KEY);
-            $completion->mark_complete($record['timecompleted']);
+            $completion->mark_complete($record->timecompleted);
         }
         $rs->close();
     }