Permalink
Browse files

MDL-34243 completion: Fixed up call to completion_criteria::factory t…

…hat was passing object
  • Loading branch information...
1 parent 8afee51 commit 9df815068cf5fc112f887f7dd5ee68779432d18a Sam Hemelryk committed Jul 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 course/togglecompletion.php
@@ -53,7 +53,7 @@
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)) {

0 comments on commit 9df8150

Please sign in to comment.