MDL-33398 Cron: fix wrong variable type in completion criterias
[moodle.git] / lib / completion / completion_criteria_date.php
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();
     }