diff --git a/course/togglecompletion.php b/course/togglecompletion.php index d7201443c89..19a584bb6fe 100644 --- a/course/togglecompletion.php +++ b/course/togglecompletion.php @@ -53,7 +53,7 @@ if ($courseid) { if ($user && $rolec) { require_sesskey(); - completion_criteria::factory((object) array('id'=>$rolec, 'criteriatype'=>COMPLETION_CRITERIA_TYPE_ROLE)); //TODO: this is dumb, because it does not fetch the data?!?! + completion_criteria::factory(array('id'=>$rolec, 'criteriatype'=>COMPLETION_CRITERIA_TYPE_ROLE)); //TODO: this is dumb, because it does not fetch the data?!?! $criteria = completion_criteria_role::fetch(array('id'=>$rolec)); if ($criteria and user_has_role_assignment($USER->id, $criteria->role, $context->id)) {