Public Member Functions |
| | __construct ($gtree, $moving=false, $gpr) |
| | build_html_tree ($element, $totals, $parents, $level, &$row_count) |
| | get_weight_input ($item, $type) |
| | format_number ($number) |
| | element_deletable ($element) |
| | move_elements ($eids, $returnurl) |
| | get_deepest_level ($element, $level=0, $deepest_level=1) |
Data Fields |
| | $columns = array() |
| | $gtree |
| | $gpr |
| | $moving |
| | $deepest_level |
| | $uses_extra_credit = false |
| | $uses_weight = false |
| | $table |
| | $categories = array() |
Detailed Description
Definition at line 18 of file lib.php.
Constructor & Destructor Documentation
Constructor
Definition at line 48 of file lib.php.
Member Function Documentation
Recursive function for building the table holding the grade categories and items, with CSS indentation and styles.
- Parameters:
-
| array | $element | The current tree element being rendered |
| boolean | $totals | Whether or not to print category grade items (category totals) |
| array | $parents | An array of parent categories for the current element (used for indentation and row classes) |
- Returns:
- string HTML
prepare move target if needed
print the list items now
Definition at line 110 of file lib.php.
Given an element of the grade tree, returns whether it is deletable or not (only manual grade items are deletable)
- Parameters:
-
- Returns:
- bool
Definition at line 397 of file lib.php.
Recurses through the entire grade tree to find and return the maximum depth of the tree. This should be run only once from the root element (course category), and is used for the indentation of the Name column's cells (colspan)
- Parameters:
-
| array | $element | An array of values representing a grade tree's element (all grade items in this case) |
| int | $level | The level of the current recursion |
| int | $deepest_level | A value passed to each subsequent level of recursion and incremented if $level > $deepest_level |
- Returns:
- int Deepest level
Definition at line 466 of file lib.php.
Given a grade_item object, returns a labelled input if an aggregation coefficient (weight or extra credit) applies to it.
- Parameters:
-
| grade_item | $item | |
| string | type "extra" or "weight": the type of the column hosting the weight input |
- Returns:
- string HTML
Definition at line 351 of file lib.php.
Given the grade tree and an array of element ids (e.g. c15, i42), and expecting the 'moveafter' URL param, moves the selected items to the requested location. Then redirects the user to the given $returnurl
- Parameters:
-
| object | $gtree | The grade tree (a recursive representation of the grade categories and grade items) |
| array | $eids | |
| string | $returnurl | |
Definition at line 427 of file lib.php.
Field Documentation
| $uses_extra_credit = false |
The documentation for this class was generated from the following file:
- C:/xampp/htdocs/moodle/grade/edit/tree/lib.php