mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-37933 core_complete: fixed criteria/criterion naming confusion
This commit is contained in:
parent
4275ea4a43
commit
5211efb99b
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user