~ubuntu-branches/ubuntu/trusty/moodle/trusty-proposed

« back to all changes in this revision

Viewing changes to course/togglecompletion.php

  • Committer: Package Import Robot
  • Author(s): Tomasz Muras
  • Date: 2012-11-15 21:50:13 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20121115215013-hmzkwz3v5hvm2a0a
Tags: 2.2.6.dfsg-1
New upstream version: 2.2.6 (Build: 20121112)

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    if ($user && $rolec) {
54
54
        require_sesskey();
55
55
 
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));
58
58
 
59
59
        if ($criteria and user_has_role_assignment($USER->id, $criteria->role, $context->id)) {