Commit 5211efb9 authored by Mark Nelson's avatar Mark Nelson
Browse files

MDL-37933 core_complete: fixed criteria/criterion naming confusion

parent 4275ea4a
......@@ -356,19 +356,19 @@ class completion_info {
* @return array
*/
public function get_completions($user_id, $criteriatype = null) {
$criterion = $this->get_criteria($criteriatype);
$criteria = $this->get_criteria($criteriatype);
$completions = array();
foreach ($criterion as $criteria) {
foreach ($criteria as $criterion) {
$params = array(
'course' => $this->course_id,
'userid' => $user_id,
'criteriaid' => $criteria->id
'criteriaid' => $criterion->id
);
$completion = new completion_criteria_completion($params);
$completion->attach_criteria($criteria);
$completion->attach_criteria($criterion);
$completions[] = $completion;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment