Public Member Functions |
| | __construct ($courseid, $gpr, $context, $page=null, $sortitemid=null) |
| | process_data ($data) |
| | load_users () |
| | load_final_grades () |
| | get_toggles_html () |
| | print_toggle ($type) |
| | get_left_rows () |
| | get_right_rows () |
| | get_grade_table () |
| | get_left_icons_row ($rows=array(), $colspan=1) |
| | get_left_range_row ($rows=array(), $colspan=1) |
| | get_left_avg_row ($rows=array(), $colspan=1, $groupavg=false) |
| | get_right_icons_row ($rows=array()) |
| | get_right_range_row ($rows=array()) |
| | get_right_avg_row ($rows=array(), $grouponly=false) |
| | process_action ($target, $action) |
| | is_fixed_students () |
| | get_sort_arrows (array $extrafields=array()) |
Data Fields |
| | $grades |
| | $gradeserror = array() |
| | $sortitemid |
| | $sortorder |
| | $userselect |
| | $userselectparams = array() |
| | $collapsed |
| | $rowcount = 0 |
| | $canviewhidden |
| | $preferencespage = false |
Protected Member Functions |
| | get_icons ($element) |
| | get_collapsing_icon ($element) |
Protected Attributes |
| | $feedback_trunc_length = 50 |
Detailed Description
Definition at line 31 of file lib.php.
Constructor & Destructor Documentation
| __construct |
( |
$ |
courseid, |
|
|
$ |
gpr, |
|
|
$ |
context, |
|
|
$ |
page = null, |
|
|
$ |
sortitemid = 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) |
| int | $sortitemid | The id of the grade_item by which to sort the table |
Definition at line 104 of file lib.php.
Member Function Documentation
Given a category element returns collapsing +/- icon if available
- Parameters:
-
- Returns:
- string HTML
Definition at line 1490 of file lib.php.
Depending on the style of report (fixedstudents vs traditional one-table), arranges the rows of data in one or two tables, and returns the output of these tables in HTML
- Returns:
- string HTML
Definition at line 1059 of file lib.php.
Given a grade_category, grade_item or grade_grade, this function figures out the state of the object and builds then returns a div with the icons needed for the grader report.
- Parameters:
-
- Returns:
- string HTML
Definition at line 1444 of file lib.php.
Builds and return the headers for the rows of averages, for the left part of the grader report.
- Parameters:
-
| array | $rows | The Array of rows for the left part of the report |
| int | $colspan | The number of columns this cell has to span |
| bool | $groupavg | If true, returns the row for group averages, otherwise for overall averages |
- Returns:
- array Array of rows for the left part of the report
Definition at line 1151 of file lib.php.
Builds and return the row of icons for the left side of the report. It only has one cell that says "Controls"
- Parameters:
-
| array | $rows | The Array of rows for the left part of the report |
| int | $colspan | The number of columns this cell has to span |
- Returns:
- array Array of rows for the left part of the report
Definition at line 1102 of file lib.php.
Builds and return the header for the row of ranges, for the left part of the grader report.
- Parameters:
-
| array | $rows | The Array of rows for the left part of the report |
| int | $colspan | The number of columns this cell has to span |
- Returns:
- array Array of rows for the left part of the report
Definition at line 1125 of file lib.php.
Builds and returns the rows that will make up the left part of the grader report This consists of student names and icons, links to user reports and id numbers, as well as header cells for these columns. It also includes the fillers required for the categories displayed on the right side of the report.
- Returns:
- array Array of html_table_row objects
Definition at line 554 of file lib.php.
Builds and return the row of averages for the right part of the grader report.
- Parameters:
-
| array | $rows | Whether to return only group averages or all averages. |
| bool | $grouponly | Whether to return only group averages or all averages. |
- Returns:
- array Array of rows for the right part of the report
Definition at line 1263 of file lib.php.
Builds and return the row of icons when editing is on, for the right part of the grader report.
- Parameters:
-
| array | $rows | The Array of rows for the right part of the report |
- Returns:
- array Array of rows for the right part of the report
Definition at line 1200 of file lib.php.
Builds and return the row of ranges for the right part of the grader report.
- Parameters:
-
| array | $rows | The Array of rows for the right part of the report |
- Returns:
- array Array of rows for the right part of the report
Definition at line 1227 of file lib.php.
Builds and returns the rows that will make up the right part of the grader report
- Returns:
- array Array of html_table_row objects
Definition at line 682 of file lib.php.
Refactored function for generating HTML of sorting links with matching arrows. Returns an array with 'studentname' and 'idnumber' as keys, with HTML ready to inject into a table header cell.
- Parameters:
-
| array | $extrafields | Array of extra fields being displayed, such as user idnumber |
- Returns:
- array An associative array of HTML sorting links+arrows
Definition at line 1596 of file lib.php.
Builds and returns a div with on/off toggles.
- Returns:
- string HTML code
Definition at line 463 of file lib.php.
Returns whether or not to display fixed students column. Includes a browser check, because IE6 doesn't support the scrollbar.
- Returns:
- bool
Definition at line 1576 of file lib.php.
we supply the userids in this query, and get all the grades pulls out all the grades, this does not need to worry about paging
Definition at line 424 of file lib.php.
pulls out the userids of the users to be display, and sorts them
Definition at line 333 of file lib.php.
Shortcut function for printing the grader report toggles.
- Parameters:
-
| string | $type | The type of toggle |
| bool | $return | Whether to return the HTML string rather than printing it |
- Returns:
- void
Definition at line 503 of file lib.php.
Processes a single action against a category, grade_item or grade.
- Parameters:
-
| string | $target | eid ({type}{id}, e.g. c4 for category4) |
| string | $action | Which action to take (edit, delete etc...) |
- Returns:
Reimplemented from grade_report.
Definition at line 1525 of file lib.php.
Processes the data sent by the form (grades and feedbacks). Caller is responsible for all access control checks
- Parameters:
-
| array | $data | form submission (with magic quotes) |
- Returns:
- array empty array if success, array of warnings if something fails.
Reimplemented from grade_report.
Definition at line 156 of file lib.php.
Field Documentation
Capability check caching
Definition at line 85 of file lib.php.
List of collapsed categories from user preference
Definition at line 74 of file lib.php.
int $feedback_trunc_length = 50 [protected] |
Length at which feedback will be truncated (to the nearest word) and an ellipsis be added. TODO replace this by a report preference
Definition at line 94 of file lib.php.
The final grades.
Definition at line 36 of file lib.php.
Array of errors for bulk grades updating.
Definition at line 42 of file lib.php.
A count of the rows, used for css classes.
Definition at line 80 of file lib.php.
The id of the grade_item by which this report will be sorted.
Definition at line 50 of file lib.php.
Sortorder used in the SQL selections.
Definition at line 56 of file lib.php.
An SQL fragment affecting the search for users.
Definition at line 62 of file lib.php.
The bound params for $userselect
Definition at line 68 of file lib.php.
The documentation for this class was generated from the following file:
- C:/xampp/htdocs/moodle/grade/report/grader/lib.php