Issue Details (XML | Word | Printable)

Key: MDL-20211
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: moodle.com
Reporter: Hubert Chathi
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

A couple bugs in accesslib.php

Created: 03/Sep/09 11:51 PM   Updated: 03/Sep/09 11:51 PM
Return to search
Component/s: Roles
Affects Version/s: 2.0
Fix Version/s: None

Participants: Hubert Chathi and moodle.com
Security Level: None
Affected Branches: MOODLE_20_STABLE


 Description  « Hide
While working on MDL-20045, I noticed a couple of bugs in the current accesslib.php in Moodle 2.0:
* get_child_contexts sometimes returns a record set instead of an array, which is what the documentation states it is. This breaks get_role_context_caps, since it passes the return value of get_child_contexts to array_keys. In addition, the record set has already been iterated through, and cannot be rewound. (In Moodle 1.9, the record sets were copied to an array, and the array was returned).
* fetch_context_capabilities for blocks and modules searches for records that have the component equal to "block/..." and "mod/..." respectively. However in Moodle 2.0, the format seems to have been changed to "block_..." and "mod_...". ("_" instead of "/".)


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.