|
| __construct ($gtree, $moving=false, $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. More...
|
|
| element_deletable ($element) |
| Given an element of the grade tree, returns whether it is deletable or not (only manual grade items are deletable) More...
|
|
| 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. More...
|
|
| move_elements ($eids, $returnurl) |
| Given the grade tree and an array of element ids (e.g. More...
|
|
|
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. More...
|
|
◆ 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()
grade_edit_tree::element_deletable |
( |
|
$element | ) |
|
Given an element of the grade tree, returns whether it is deletable or not (only manual grade items are deletable)
- 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 | |
◆ $gpr
◆ $gtree
The documentation for this class was generated from the following file: