MDL-34243 completion: Fixed up call to completion_criteria::factory that was passing object
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user