Permalink
Browse files

MDL-33398 Cron: fix wrong variable type in completion criterias

  • Loading branch information...
1 parent 9c6e153 commit ccc604a24dc83f99bad68671d434e468f272e52f @FMCorz FMCorz committed with danpoltawski May 31, 2012
@@ -194,7 +194,7 @@ public function cron() {
$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();
}
@@ -180,7 +180,7 @@ public function cron() {
$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();
}
@@ -216,7 +216,7 @@ public function cron() {
$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();
}

0 comments on commit ccc604a

Please sign in to comment.