mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Revert "MDL-33117 grade: added some smarts to the user report method inject_rowspans() to deal with activity conditional availability"
This reverts commit 69c8bcec70f8ffacabb4ba228c5de674aa3520c7.
This commit is contained in:
parent
5e6f26bdbe
commit
f7e8f312ca
@ -228,26 +228,6 @@ class grade_report_user extends grade_report {
|
||||
}
|
||||
$count = 1;
|
||||
foreach ($element['children'] as $key=>$child) {
|
||||
|
||||
$grade_object = $child['object'];
|
||||
// If grade object isn't hidden
|
||||
if ($grade_object->hidden != 1) {
|
||||
|
||||
// If grade object is an module instance
|
||||
if (!empty($grade_object->itemmodule) && !empty($grade_object->iteminstance)) {
|
||||
|
||||
$instances = $this->gtree->modinfo->get_instances();
|
||||
// If we can find the module instance
|
||||
if (!empty($instances[$grade_object->itemmodule][$grade_object->iteminstance])) {
|
||||
|
||||
$cm = $instances[$grade_object->itemmodule][$grade_object->iteminstance];
|
||||
// Skip generating rowspans if the user cannot see the module instance
|
||||
if (!$cm->uservisible) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$count += $this->inject_rowspans($element['children'][$key]);
|
||||
}
|
||||
$element['rowspan'] = $count;
|
||||
|
Loading…
x
Reference in New Issue
Block a user