Issue Details (XML | Word | Printable)

Key: MDL-16348
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Tim Hunt
Reporter: Tim Hunt
Votes: 0
Watchers: 1
Operations

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

A way for admin report plugins to specify where they appear in the admin tree

Created: 05/Sep/08 06:02 PM   Updated: 08/Sep/08 07:32 PM
Return to search
Component/s: Administration
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: 1. Text File admintree.patch.txt (15 kB)


Participants: Petr Skoda and Tim Hunt
Security Level: None
Resolved date: 08/Sep/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
In each admin report plugin, there will be an optional file lib.php, which may define two variables:

$placeintree = array('users', 'roles');
$requirecapability = 'moodle/role:manage';

If this was in admin/report/capability/lib.php, then it would say that the capability report appears under Users -> Permissions, and is only available to people with the moodle/role:manage capability.

If lib.php does not exist, or either of these variables are not defined in that file, then the default is

$placeintree = array('reports');
$requirecapability = 'moodle/site:viewreports';

The strings in the $placeintree array are the names passed to the admin_category constructor.

Note that this has to work, even if reports want to add themselves to the experimental category, that is, reports need to be processed last when building the tree, although the reports category will remain second from last.

As well as moving the new Capabilities report to Users -> Permissions, we will move Unit tests and Functional DB tests (and XMLDB editor, although that is not a report) to a new Developer top level category.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Tim Hunt made changes - 08/Sep/08 07:19 PM
Field Original Value New Value
Attachment admintree.patch.txt [ 15085 ]
Tim Hunt made changes - 08/Sep/08 07:32 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]