Developer Documentation

/enrol/ -> renderer.php (summary)

This is the main renderer for the enrol section.

Copyright: 2010 Sam Hemelryk
License: GNU GPL v3 or later
File Size: 781 lines (28 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 classes

Class: core_enrol_renderer  - X-Ref

This is the core renderer

render_course_enrolment_users_table(course_enrolment_users_table $table,moodleform $mform)   X-Ref
Renders a course enrolment table

return: string
param: course_enrolment_table $table
param: moodleform $mform Form that contains filter controls

render_enrol_user_button(enrol_user_button $button)   X-Ref
Renderers the enrol_user_button.

return: string XHTML
param: enrol_user_button $button

render_course_enrolment_other_users_table(course_enrolment_other_users_table $table)   X-Ref
Renders a course enrolment table

return: string
param: course_enrolment_table $table

user_roles_and_actions($userid, $roles, $assignableroles, $canassign, $pageurl)   X-Ref
Generates HTML to display the users roles and any available actions

return: string
param: int $userid
param: array $roles
param: array $assignableroles
param: moodle_url $pageurl

user_groups_and_actions($userid, $groups, $allgroups, $canmanagegroups, $pageurl)   X-Ref
Generates the HTML to view the users groups and available group actions

return: string
param: int $userid
param: array $groups
param: array $allgroups
param: bool $canmanagegroups
param: moodle_url $pageurl

user_enrolments_and_actions($enrolments)   X-Ref
Generates the HTML for the given enrolments + available actions

return: string
param: int $userid
param: array $enrolments
param: moodle_url $pageurl

render_user_enrolment_action(user_enrolment_action $icon)   X-Ref
Renders a user enrolment action

return: string
param: user_enrolment_action $icon

Class: course_enrolment_table  - X-Ref

Main course enrolment table

This table is used to display the enrolment information for a course.
It requires that a course enrolment manager be provided during constuct with
provides all of the information for the table.
The control then produces the table, the paging, and the associated JS actions
for the page.

__construct(course_enrolment_manager $manager)   X-Ref
Constructs the table

param: course_enrolment_manager $manager

get_manual_enrol_buttons()   X-Ref
Returns an array of enrol_user_buttons that are created by the different
enrolment plugins available.

return: array

get_field_sort_direction($field)   X-Ref
Gets the sort direction for a given field

return: string ASC or DESC
param: string $field

set_fields($fields, $output)   X-Ref
Sets the fields for this table. These get added to the tables head as well.

You can also use a multi dimensional array for this to have multiple fields
in a single column

param: array $fields An array of fields to set
param: string $output

set_total_users($totalusers)   X-Ref
Sets the total number of users

param: int $totalusers

set_users(array $users)   X-Ref
Sets the users for this table

return: void
param: array $users

initialise_javascript()   X-Ref
No description

get_paging_bar()   X-Ref
Gets the paging bar instance for this table

return: paging_bar

get_direction_icon($output, $field)   X-Ref
Gets the direction icon for the sortable field within this table

return: string
param: core_renderer $output
param: string $field

get_url_params()   X-Ref
Gets the params that will need to be added to the url in order to return to this page.

return: array

get_combined_url_params()   X-Ref
Returns an array of URL params for both the table and the manager.

return: array

set_bulk_user_enrolment_operations(array $bulkoperations)   X-Ref
Sets the bulk operations for this table.

param: array $bulkoperations

get_bulk_user_enrolment_operations()   X-Ref
Returns an array of bulk operations.

return: array

has_bulk_user_enrolment_operations()   X-Ref
Returns true fi the table is aware of any bulk operations that can be performed on users
selected from the currently filtered enrolment plugins.

return: bool

Class: course_enrolment_users_table  - X-Ref

Table control used for enrolled users

Class: course_enrolment_other_users_table  - X-Ref

Table used for other users

Other users are users who have roles but are not enrolled.

__construct(course_enrolment_manager $manager)   X-Ref
Constructs the table

param: course_enrolment_manager $manager

get_user_search_button()   X-Ref
Gets a button to search users and assign them roles in the course.

return: single_button
param: int $page

Search This Site: