56
completion_criteria::factory((object) array('id'=>$rolec, 'criteriatype'=>COMPLETION_CRITERIA_TYPE_ROLE)); //TODO: this is dumb, because it does not fetch the data?!?!
56
completion_criteria::factory(array('id'=>$rolec, 'criteriatype'=>COMPLETION_CRITERIA_TYPE_ROLE)); //TODO: this is dumb, because it does not fetch the data?!?!
57
57
$criteria = completion_criteria_role::fetch(array('id'=>$rolec));
59
59
if ($criteria and user_has_role_assignment($USER->id, $criteria->role, $context->id)) {