mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-33398 completion: Fix coding error (should be arrays not objects)
This commit is contained in:
parent
e6f5528585
commit
28e0c239ec
@ -235,7 +235,7 @@ class completion_criteria_activity extends completion_criteria {
|
||||
// Loop through completions, and mark as complete
|
||||
$rs = $DB->get_recordset_sql($sql);
|
||||
foreach ($rs as $record) {
|
||||
$completion = new completion_criteria_completion($record, DATA_OBJECT_FETCH_BY_KEY);
|
||||
$completion = new completion_criteria_completion((array) $record, DATA_OBJECT_FETCH_BY_KEY);
|
||||
$completion->mark_complete($record->timecompleted);
|
||||
}
|
||||
$rs->close();
|
||||
|
@ -193,7 +193,7 @@ class completion_criteria_course extends completion_criteria {
|
||||
// Loop through completions, and mark as complete
|
||||
$rs = $DB->get_recordset_sql($sql);
|
||||
foreach ($rs as $record) {
|
||||
$completion = new completion_criteria_completion($record, DATA_OBJECT_FETCH_BY_KEY);
|
||||
$completion = new completion_criteria_completion((array) $record, DATA_OBJECT_FETCH_BY_KEY);
|
||||
$completion->mark_complete($record['timecompleted']);
|
||||
}
|
||||
$rs->close();
|
||||
|
@ -179,7 +179,7 @@ class completion_criteria_date extends completion_criteria {
|
||||
// Loop through completions, and mark as complete
|
||||
$rs = $DB->get_recordset_sql($sql, array(time()));
|
||||
foreach ($rs as $record) {
|
||||
$completion = new completion_criteria_completion($record, DATA_OBJECT_FETCH_BY_KEY);
|
||||
$completion = new completion_criteria_completion((array) $record, DATA_OBJECT_FETCH_BY_KEY);
|
||||
$completion->mark_complete($record['timeend']);
|
||||
}
|
||||
$rs->close();
|
||||
|
@ -229,7 +229,7 @@ class completion_criteria_duration extends completion_criteria {
|
||||
$now = time();
|
||||
$rs = $DB->get_recordset_sql($sql, array($now, $now));
|
||||
foreach ($rs as $record) {
|
||||
$completion = new completion_criteria_completion($record, DATA_OBJECT_FETCH_BY_KEY);
|
||||
$completion = new completion_criteria_completion((array) $record, DATA_OBJECT_FETCH_BY_KEY);
|
||||
|
||||
// Use time start if not 0, otherwise use timeenrolled
|
||||
if ($record->otimestart) {
|
||||
|
@ -215,7 +215,7 @@ class completion_criteria_grade extends completion_criteria {
|
||||
// Loop through completions, and mark as complete
|
||||
$rs = $DB->get_recordset_sql($sql);
|
||||
foreach ($rs as $record) {
|
||||
$completion = new completion_criteria_completion($record, DATA_OBJECT_FETCH_BY_KEY);
|
||||
$completion = new completion_criteria_completion((array) $record, DATA_OBJECT_FETCH_BY_KEY);
|
||||
$completion->mark_complete($record['timecompleted']);
|
||||
}
|
||||
$rs->close();
|
||||
|
Loading…
x
Reference in New Issue
Block a user