';
+ // Prepare reference variables
$eid = $element['eid'];
$object = $element['object'];
$type = $element['type'];
+ // Load user preferences
+ $aggregationview = get_user_preferences('grade_report_aggregationview', $CFG->grade_report_aggregationview);
+
// Icons shown when edit mode is on
if ($USER->gradeediting) {
// Edit icon (except for grade_grades)
@@ -753,13 +769,13 @@ function grade_get_icons($element, $tree) {
if ($type != 'category' and $USER->gradefeedback) {
// Display Edit/Add feedback icon
if (empty($object->feedback)) {
- $html .= '
commonvars\">\n";
+ $html .= 'courseid\">\n";
$html .= ''. "\n";
} else {
- $html .= '
commonvars\">\n";
+ $html .= 'courseid\">\n";
$html .= ''. "\n";
@@ -785,7 +801,7 @@ function grade_get_icons($element, $tree) {
.${'str' . $lock_unlock}.'" title="'.${'str' . $lock_unlock}.'" />'. "\n";
// If object is a category, display expand/contract icon
- if (get_class($object) == 'grade_category') {
+ if (get_class($object) == 'grade_category' && $aggregationview == GRADER_REPORT_AGGREGATION_VIEW_COMPACT) {
$expand_contract = 'switch_minus'; // Default: expanded
$state = get_user_preferences('grade_category_' . $object->id, GRADE_CATEGORY_EXPANDED);
@@ -803,8 +819,8 @@ function grade_get_icons($element, $tree) {
if ($USER->gradefeedback) {
// Display Edit/Add feedback icon
if (!empty($object->feedback)) {
- $html .= '
commonvars\">\n";
+ $html .= 'courseid\">\n";
$html .= 'pixpath.'/t/feedback.gif" class="iconsmall" alt="" />'. "\n";