Public Member Functions |
| | __construct ($courseid, $gpr, $context, $page=null) |
| | process_data ($data) |
| | process_action ($target, $action) |
| | get_lang_string ($strcode, $section=null) |
| | get_numusers ($groups=true) |
Static Public Member Functions |
| | get_pref ($pref, $objectid=null) |
| | set_pref ($pref, $pref_value='default', $itemid=null) |
Data Fields |
| | $courseid |
| | $course |
| | $gpr |
| | $context |
| | $gtree |
| | $prefs = array() |
| | $gradebookroles |
| | $baseurl |
| | $pbarurl |
| | $page |
| | $lang_strings = array() |
| | $currentgroup |
| | $groupmode |
| | $group_selector |
Protected Member Functions |
| | setup_groups () |
| | get_sort_arrow ($direction='move', $sortlink=null) |
| | blank_hidden_total ($courseid, $course_item, $finalgrade) |
Protected Attributes |
| | $groupsql |
| | $groupwheresql |
| | $groupwheresql_params = array() |
Detailed Description
Definition at line 30 of file lib.php.
Constructor & Destructor Documentation
| __construct |
( |
$ |
courseid, |
|
|
$ |
gpr, |
|
|
$ |
context, |
|
|
$ |
page = null |
|
) |
| |
Constructor. Sets local copies of user preferences and initialises grade_tree.
- Parameters:
-
| int | $courseid | |
| object | $gpr | grade plugin return tracking object |
| string | $context | |
| int | $page | The current page being viewed (when report is paged) |
Reimplemented in grade_report_user.
Definition at line 142 of file lib.php.
Member Function Documentation
Optionally blank out course/category totals if they contain any hidden items
- Parameters:
-
| string | $courseid | the course id |
| string | $course_item | an instance of grade_item |
| string | $finalgrade | the grade for the course_item |
- Returns:
- string The new final grade
Definition at line 349 of file lib.php.
First checks the cached language strings, then returns match if found, or uses get_string() to get it from the DB, caches it then returns it.
- Parameters:
-
| string | $strcode | |
| string | $section | Optional language section |
- Returns:
- string
Definition at line 260 of file lib.php.
Fetches and returns a count of all the users that will be shown on this page.
- Parameters:
-
| boolean | $groups | include groups limit |
- Returns:
- int Count of users
Definition at line 272 of file lib.php.
| get_pref |
( |
$ |
pref, |
|
|
$ |
objectid = null |
|
) |
| [static] |
Given the name of a user preference (without grade_report_ prefix), locally saves then returns the value of that preference. If the preference has already been fetched before, the saved value is returned. If the preference is not set at the User level, the $CFG equivalent is given (site default). (Can be called statically, but then doesn't benefit from caching)
- Parameters:
-
| string | $pref | The name of the preference (do not include the grade_report_ prefix) |
| int | $objectid | An optional itemid or categoryid to check for a more fine-grained preference |
- Returns:
- mixed The value of the preference
Definition at line 180 of file lib.php.
Returns an arrow icon inside an tag, for the purpose of sorting a column.
- Parameters:
-
Definition at line 333 of file lib.php.
Uses set_user_preferences() to update the value of a user preference. If 'default' is given as the value, the preference will be removed in favour of a higher-level preference.
- Parameters:
-
| string | $pref_name | The name of the preference. |
| mixed | $pref_value | The value of the preference. |
| int | $itemid | An optional itemid to which the preference will be assigned |
- Returns:
- bool Success or failure.
Definition at line 228 of file lib.php.
Sets up this object's group variables, mainly to restrict the selection of users to display.
find out current groups mode
Definition at line 309 of file lib.php.
Field Documentation
The context.
Definition at line 52 of file lib.php.
The course.
Definition at line 41 of file lib.php.
The courseid.
Definition at line 35 of file lib.php.
The current group being displayed.
Definition at line 102 of file lib.php.
Grade plugin return tracking object.
Definition at line 46 of file lib.php.
The roles for this report.
Definition at line 70 of file lib.php.
A HTML select element used to select the current group.
Definition at line 114 of file lib.php.
Current course group mode
Definition at line 108 of file lib.php.
string $groupsql [protected] |
An SQL fragment used to add linking information to the group tables.
Definition at line 120 of file lib.php.
string $groupwheresql [protected] |
An SQL constraint to append to the queries used by this object to build the report.
Definition at line 126 of file lib.php.
The ordered params for $groupwheresql
Definition at line 132 of file lib.php.
Array of cached language strings (using get_string() all the time takes a long time!).
Definition at line 94 of file lib.php.
Current page (for paging).
Definition at line 88 of file lib.php.
User preferences related to this report.
Definition at line 64 of file lib.php.
The documentation for this class was generated from the following file:
- C:/xampp/htdocs/moodle/grade/report/lib.php