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


Public Member Functions | |
| __construct ($context, $roleid) | |
| read_submitted_permissions () | |
| is_submission_valid () | |
| make_copy () | |
| get_role_name () | |
| get_role_id () | |
| get_archetype () | |
| save_changes () | |
| display () | |
Protected Member Functions | |
| load_current_permissions () | |
| load_parent_permissions () | |
| get_name_field ($id) | |
| get_shortname_field ($id) | |
| get_description_field ($id) | |
| get_archetype_field ($id) | |
| get_assignable_levels_control () | |
| print_field ($name, $caption, $field) | |
| print_show_hide_advanced_button () | |
| add_permission_cells ($capability) | |
Protected Attributes | |
| $role | |
| $errors | |
| $contextlevels | |
| $allcontextlevels | |
| $disabled = '' | |
As well as tracking the permissions information about the role we are creating or editing, we also track the other information about the role. (This class is starting to be more and more like a formslib form in some respects.)
| __construct | ( | $ | context, |
| $ | id | ||
| ) |
Constructor
| object | $context | the context this table relates to. |
| string | $id | what to put in the id="" attribute. |
Reimplemented from capability_table_base.
Reimplemented in view_role_definition_table, and define_role_table_basic.
| add_permission_cells | ( | $ | capability | ) | [protected] |
One cell for each possible permission.
Reimplemented from capability_table_with_risks.
Reimplemented in view_role_definition_table, and define_role_table_basic.
| 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_with_risks.
Definition at line 778 of file lib.php.

| get_archetype | ( | ) |
| get_archetype_field | ( | $ | id | ) | [protected] |
Reimplemented in view_role_definition_table.
Definition at line 718 of file lib.php.


| get_assignable_levels_control | ( | ) | [protected] |
| get_description_field | ( | $ | id | ) | [protected] |
Reimplemented in view_role_definition_table.
Definition at line 714 of file lib.php.


| get_name_field | ( | $ | id | ) | [protected] |
Reimplemented in view_role_definition_table.
Definition at line 706 of file lib.php.


| get_role_id | ( | ) |
| get_role_name | ( | ) |
| get_shortname_field | ( | $ | id | ) | [protected] |
Reimplemented in view_role_definition_table.
Definition at line 710 of file lib.php.


| load_current_permissions | ( | ) | [protected] |
Reimplemented from capability_table_with_risks.
Definition at line 568 of file lib.php.

| load_parent_permissions | ( | ) | [protected] |
Reimplemented from capability_table_with_risks.
Definition at line 683 of file lib.php.

| make_copy | ( | ) |
| print_field | ( | $ | name, |
| $ | caption, | ||
| $ | field | ||
| ) | [protected] |
| print_show_hide_advanced_button | ( | ) | [protected] |
Reimplemented in view_role_definition_table, and define_role_table_basic.
Definition at line 771 of file lib.php.

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 from capability_table_with_risks.
Definition at line 592 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 from capability_table_with_risks.
Reimplemented in view_role_definition_table.
Definition at line 687 of file lib.php.

$errors [protected] |
$role [protected] |