MDL-11718 aggregated grades which depend on hidden grades are now hidden too + cleanup in grader report

This commit is contained in:
skodak 2007-10-17 20:38:52 +00:00
parent 93b2ed94a8
commit b89a70ce8a
5 changed files with 108 additions and 87 deletions

View file

@ -735,7 +735,7 @@ class grade_seq {
$this->elements = grade_seq::flatten($top_element, $category_grade_last, $nooutcomes);
foreach ($this->elements as $key=>$unused) {
$this->items[$key] =& $this->elements[$key]['object'];
$this->items[$this->elements[$key]['object']->id] =& $this->elements[$key]['object'];
}
}
@ -872,6 +872,11 @@ class grade_tree {
*/
var $context;
/**
* Grade items
*/
var $items;
/**
* Constructor, retrieves and stores a hierarchical array of all grade_category and grade_item
* objects for the given courseid. Full objects are instantiated. Ordering sequence is fixed if needed.
@ -1011,6 +1016,7 @@ class grade_tree {
$element['eid'] = 'c'.$element['object']->id;
} else if (in_array($element['type'], array('item', 'courseitem', 'categoryitem'))) {
$element['eid'] = 'i'.$element['object']->id;
$this->items[$element['object']->id] =& $element['object'];
}
$levels[$depth][] =& $element;