MDL-32203 completion: Fix issues with data object where clauses
This commit is contained in:
committed by
Aaron Barnes
parent
aa753ac24f
commit
dbfcf440fa
@@ -322,8 +322,9 @@ class completion_info {
|
||||
*/
|
||||
public function get_user_completion($user_id, $criteria) {
|
||||
$params = array(
|
||||
'course' => $this->course_id,
|
||||
'userid' => $user_id,
|
||||
'criteriaid' => $criteria->id,
|
||||
'userid' => $user_id
|
||||
);
|
||||
|
||||
$completion = new completion_criteria_completion($params);
|
||||
@@ -362,7 +363,7 @@ class completion_info {
|
||||
// Build array of criteria objects
|
||||
$this->criteria = array();
|
||||
foreach ($records as $record) {
|
||||
$this->criteria[$record->id] = completion_criteria::factory($record);
|
||||
$this->criteria[$record->id] = completion_criteria::factory((array)$record);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user