[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/grade/edit/tree/ -> lib.php (summary)

(no description)

File Size: 912 lines (36 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 6 classes

grade_edit_tree:: (11 methods):
  __construct()
  build_html_tree()
  get_weight_input()
  format_number()
  element_deletable()
  move_elements()
  get_deepest_level()
  factory()
  get_category_cell()
  get_item_cell()
  __construct()

grade_edit_tree_column_name:: (4 methods):
  __construct()
  get_header_cell()
  get_category_cell()
  get_item_cell()

grade_edit_tree_column_weight:: (3 methods):
  get_header_cell()
  get_category_cell()
  get_item_cell()

grade_edit_tree_column_range:: (3 methods):
  get_header_cell()
  get_category_cell()
  get_item_cell()

grade_edit_tree_column_actions:: (4 methods):
  __construct()
  get_header_cell()
  get_category_cell()
  get_item_cell()

grade_edit_tree_column_select:: (3 methods):
  get_header_cell()
  get_category_cell()
  get_item_cell()


Class: grade_edit_tree  - X-Ref

A library of classes used by the grade edit pages

__construct($gtree, $moving=false, $gpr)   X-Ref
Constructor


build_html_tree($element, $totals, $parents, $level, &$row_count)   X-Ref
Recursive function for building the table holding the grade categories and items,
with CSS indentation and styles.

param: array   $element The current tree element being rendered
param: boolean $totals Whether or not to print category grade items (category totals)
param: array   $parents An array of parent categories for the current element (used for indentation and row classes)
return: string HTML

get_weight_input($item)   X-Ref
Given a grade_item object, returns a labelled input if an aggregation coefficient (weight or extra credit) applies to it.

param: grade_item $item
return: string HTML

format_number($number)   X-Ref
No description

element_deletable($element)   X-Ref
Given an element of the grade tree, returns whether it is deletable or not (only manual grade items are deletable)

param: array $element
return: bool

move_elements($eids, $returnurl)   X-Ref
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

param: object $gtree The grade tree (a recursive representation of the grade categories and grade items)
param: array $eids
param: string $returnurl

get_deepest_level($element, $level=0, $deepest_level=1)   X-Ref
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)

param: array $element An array of values representing a grade tree's element (all grade items in this case)
param: int $level The level of the current recursion
param: int $deepest_level A value passed to each subsequent level of recursion and incremented if $level > $deepest_level
return: int Deepest level

factory($name, $params=array()   X-Ref
html_table_cell object used as a template for item cells in all categories.
It must be cloned before being used.


get_category_cell($category, $levelclass, $params)   X-Ref
No description

get_item_cell($item, $params)   X-Ref
No description

__construct()   X-Ref
No description

Class: grade_edit_tree_column_name  - X-Ref

Class grade_edit_tree_column_name

__construct($params)   X-Ref
No description

get_header_cell()   X-Ref
No description

get_category_cell($category, $levelclass, $params)   X-Ref
No description

get_item_cell($item, $params)   X-Ref
No description

Class: grade_edit_tree_column_weight  - X-Ref

Class grade_edit_tree_column_weight

get_header_cell()   X-Ref
No description

get_category_cell($category, $levelclass, $params)   X-Ref
No description

get_item_cell($item, $params)   X-Ref
No description

Class: grade_edit_tree_column_range  - X-Ref

Class grade_edit_tree_column_range

get_header_cell()   X-Ref
No description

get_category_cell($category, $levelclass, $params)   X-Ref
No description

get_item_cell($item, $params)   X-Ref
No description

Class: grade_edit_tree_column_actions  - X-Ref

Class grade_edit_tree_column_actions

__construct($params)   X-Ref
No description

get_header_cell()   X-Ref
No description

get_category_cell($category, $levelclass, $params)   X-Ref
No description

get_item_cell($item, $params)   X-Ref
No description

Class: grade_edit_tree_column_select  - X-Ref

Class grade_edit_tree_column_select

get_header_cell()   X-Ref
No description

get_category_cell($category, $levelclass, $params)   X-Ref
No description

get_item_cell($item, $params)   X-Ref
No description



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1