|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct ($context, $id, $roleid) | |
| read_submitted_permissions () | |
| save_changes () | |
| display () | |
| get_risk_icon ($type) | |
Protected Member Functions | |
| load_current_permissions () | |
| load_parent_permissions () | |
| add_header_cells () | |
| num_extra_columns () | |
| get_row_classes ($capability) | |
| add_permission_cells ($capability) | |
| add_row_cells ($capability) | |
Protected Attributes | |
| $allrisks | |
| $allpermissions | |
| $strperms | |
| $risksurl | |
| $riskicons = array() | |
| $parentpermissions | |
| $displaypermissions | |
| $permissions | |
| $changed | |
| $roleid | |
This subclass is the bases for both the define roles and override roles pages. As well as adding the risks columns, this also provides generic facilities for showing a certain number of permissions columns, and recording the current and submitted permissions for each capability.
| __construct | ( | $ | context, |
| $ | id, | ||
| $ | roleid | ||
| ) |
Fill in any blank permissions with an explicit CAP_INHERIT, and init a locked field.
Reimplemented in override_permissions_table_advanced.
Definition at line 389 of file lib.php.

| add_header_cells | ( | ) | [protected] |
For subclasses to override, output header cells, after the initial capability one.
Reimplemented from capability_table_base.
| add_permission_cells | ( | $ | capability | ) | [abstract, protected] |
Reimplemented in override_permissions_table_advanced, view_role_definition_table, define_role_table_basic, and define_role_table_advanced.

| add_row_cells | ( | $ | capability | ) | [protected] |
For subclasses to override. Output the data cells for this capability. The capability name cell will already have been output.
You can rely on get_row_classes always being called before add_row_cells.
| object | $capability | the capability this row relates to. |
One cell for each possible risk.
Reimplemented from capability_table_base.
Definition at line 508 of file lib.php.

| display | ( | ) |
Display the table.
Loop over capabilities.
Prints a breaker if component or name or context level has changed
Start the row.
Table cell for the capability name.
Add the cells specific to this table.
End the row.
End of the table.
Reimplemented from capability_table_base.
Reimplemented in define_role_table_advanced.
Definition at line 475 of file lib.php.

| get_risk_icon | ( | $ | type | ) |
| get_row_classes | ( | $ | capability | ) | [protected] |
For subclasses to override. A change to reaturn class names that are added to the class="" attribute on the <tr> for this capability.
| object | $capability | the capability this row relates to. |
Reimplemented from capability_table_base.
| load_current_permissions | ( | ) | [protected] |
Load the overrides/definition in this context.
Reimplemented in define_role_table_advanced.
Definition at line 419 of file lib.php.

| load_parent_permissions | ( | ) | [abstract, protected] |
Reimplemented in override_permissions_table_advanced, and define_role_table_advanced.

| num_extra_columns | ( | ) | [protected] |
For subclasses to override, return the number of cells that add_header_cells/add_row_cells output.
Reimplemented from capability_table_base.
Update $this->permissions based on submitted data, while making a list of changed capabilities in $this->changed.
The user is not allowed to change the permission for this capability
A permission was not specified in submitted data.
If the permission has changed, update $this->permissions and Record the fact there is data to save.
Reimplemented in define_role_table_advanced.
Definition at line 437 of file lib.php.

| save_changes | ( | ) |
Save the new values of any permissions that have been changed.
Set the permissions.
Force accessinfo refresh for users visiting this context.
Reimplemented in view_role_definition_table, and define_role_table_advanced.
Definition at line 464 of file lib.php.

$parentpermissions [protected] |