MDL-34243 completion: Fixed up call to completion_criteria::factory that was passing object

This commit is contained in:
Sam Hemelryk
2012-07-23 09:38:28 +12:00
parent 8afee51adb
commit 9df815068c
+1 -1
View File
@@ -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)) {