|
| __construct ($gtree, $moving, $gpr) |
| Constructor.
|
|
| build_html_tree ($element, $totals, $parents, $level, &$row_count) |
| Recursive function for building the table holding the grade categories and items, with CSS indentation and styles.
|
|
| get_deepest_level ($element, $level=0, $deepest_level=1) |
| Recurses through the entire grade tree to find and return the maximum depth of the tree.
|
|
| move_elements ($eids, $returnurl) |
| Given the grade tree and an array of element ids (e.g.
|
|
|
static | element_deletable ($element) |
| Given an element of the grade tree, returns whether it is deletable or not (only manual grade items are deletable)
|
|
static | element_duplicatable ($element) |
| Given an element of the grade tree, returns whether it is duplicatable or not (only manual grade items are duplicatable)
|
|
static | format_number ($number) |
|
static | get_weight_input ($item) |
| Given a grade_item object, returns a labelled input if an aggregation coefficient (weight or extra credit) applies to it.
|
|
static | update_gradecategory (grade_category $gradecategory, stdClass $data) |
| Updates the provided gradecategory item with the provided data.
|
|
|
| $categories = array() |
|
| $columns = array() |
|
| $deepest_level |
|
grade_plugin_return | $gpr |
|
grade_tree | $gtree |
| $gtree
|
|
string | $moving |
| $moving The eid of the category or item being moved
|
|
| $table |
|
| $uses_weight = false |
|
◆ build_html_tree()
grade_edit_tree::build_html_tree |
( |
| $element, |
|
|
| $totals, |
|
|
| $parents, |
|
|
| $level, |
|
|
& | $row_count ) |
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) |
- Return values
-
◆ element_deletable()
static grade_edit_tree::element_deletable |
( |
| $element | ) |
|
|
static |
Given an element of the grade tree, returns whether it is deletable or not (only manual grade items are deletable)
- Parameters
-
- Return values
-
◆ element_duplicatable()
static grade_edit_tree::element_duplicatable |
( |
| $element | ) |
|
|
static |
Given an element of the grade tree, returns whether it is duplicatable or not (only manual grade items are duplicatable)
- Parameters
-
- Return values
-
◆ get_deepest_level()
grade_edit_tree::get_deepest_level |
( |
| $element, |
|
|
| $level = 0, |
|
|
| $deepest_level = 1 ) |
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 |
- Return values
-
◆ get_weight_input()
static grade_edit_tree::get_weight_input |
( |
| $item | ) |
|
|
static |
Given a grade_item object, returns a labelled input if an aggregation coefficient (weight or extra credit) applies to it.
- Parameters
-
- Return values
-
◆ move_elements()
grade_edit_tree::move_elements |
( |
| $eids, |
|
|
| $returnurl ) |
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 | |
◆ update_gradecategory()
static grade_edit_tree::update_gradecategory |
( |
grade_category | $gradecategory, |
|
|
stdClass | $data ) |
|
static |
Updates the provided gradecategory item with the provided data.
- Parameters
-
grade_category | $gradecategory | The category to update. |
stdClass | $data | the data to update the category with. |
- Return values
-
◆ $gpr
◆ $gtree
$gtree
- See also
- grade/lib.php
The documentation for this class was generated from the following file: