Moodle  2.2.1
http://www.collinsharper.com
role_allow_role_page Class Reference
Inheritance diagram for role_allow_role_page:

Public Member Functions

 __construct ($tablename, $targetcolname)
 process_submission ()
 load_current_settings ()
 get_table ()
 get_intro_text ()

Protected Member Functions

 load_required_roles ()
 set_allow ($fromroleid, $targetroleid)
 is_allowed_target ($targetroleid)

Protected Attributes

 $tablename
 $targetcolname
 $roles
 $allowed = null

Detailed Description

Base class for managing the data in the grid of checkboxes on the role allow allow/overrides/switch editing pages (allow.php).

Definition at line 1255 of file lib.php.


Constructor & Destructor Documentation

__construct ( tablename,
targetcolname 
)
Parameters:
string$tablenamethe table where our data is stored.
string$targetcolnamethe name of the target role id column.

Definition at line 1265 of file lib.php.

Here is the call graph for this function:


Member Function Documentation

get_intro_text ( ) [abstract]

Snippet of text displayed above the table, telling the admin what to do.

Returns:
unknown_type

Reimplemented in role_allow_switch_page, role_allow_override_page, and role_allow_assign_page.

get_table ( )
Returns:
object a $table structure that can be passed to print_table, containing one cell for each checkbox.

Add role name headers.

Now the rest of the table.

Definition at line 1334 of file lib.php.

is_allowed_target ( targetroleid) [protected]
Parameters:
integer$targetroleida role id.
Returns:
boolean whether the user should be allowed to select this role as a target role.

Reimplemented in role_allow_switch_page.

Definition at line 1326 of file lib.php.

Load the current allows from the database.

Load the current settings

Definition at line 1306 of file lib.php.

load_required_roles ( ) [protected]

Load information about all the roles we will need information about.

Get all roles

Reimplemented in role_allow_switch_page.

Definition at line 1274 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Update the data with the new settings submitted by the user.

Delete all records, then add back the ones that should be allowed.

Definition at line 1283 of file lib.php.

Here is the call graph for this function:

set_allow ( fromroleid,
targetroleid 
) [abstract, protected]

Set one allow in the database.

Parameters:
integer$fromroleid
integer$targetroleid

Reimplemented in role_allow_switch_page, role_allow_override_page, and role_allow_assign_page.

Here is the caller graph for this function:


Field Documentation

$allowed = null [protected]

Definition at line 1259 of file lib.php.

$roles [protected]

Definition at line 1258 of file lib.php.

$tablename [protected]

Definition at line 1256 of file lib.php.

$targetcolname [protected]

Definition at line 1257 of file lib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations