}
$html .= $this->print_toggle('averages', true);
- $html .= $this->print_toggle('groups', true);
+
+ if (has_capability('moodle/grade:viewall', $this->context)
+ and has_capability('moodle/site:accessallgroups', $this->context)
+ and $course_has_groups = true) { // TODO replace that last condition with proper check
+ $html .= $this->print_toggle('groups', true);
+ }
+
$html .= $this->print_toggle('ranges', true);
if (!empty($CFG->enableoutcomes)) {
$html .= $this->print_toggle('nooutcomes', true);
$averagesdecimalpoints = $this->get_pref('averagesdecimalpoints');
$meanselection = $this->get_pref('meanselection');
$avghtml = '';
+ $avgcssclass = 'avg';
if ($grouponly) {
$straverage = get_string('groupavg', 'grades');
$showaverages = $this->currentgroup && $this->get_pref('showgroups');
$groupsql = $this->groupsql;
$groupwheresql = $this->groupwheresql;
+ $avgcssclass = 'groupavg';
} else {
- $straverage = get_string('average', 'grades');
+ $straverage = get_string('completeaverage', 'grades');
$showaverages = $this->get_pref('showaverages');
$groupsql = null;
$groupwheresql = null;
}
}
- $avghtml = '<tr class="r'.$this->rowcount++.'"><th class="header c0" scope="row">'.$straverage.'</th>';
+ $avghtml = '<tr class="' . $avgcssclass . ' r'.$this->rowcount++.'"><th class="header c0" scope="row">'.$straverage.'</th>';
$columncount=1;
foreach ($this->items as $item) {
<?php // $Id$
$row = $tabs = array();
+
$row[] = new tabobject('graderreport',
$CFG->wwwroot.'/grade/report/grader/index.php?id='.$courseid,
get_string('modulename', 'gradereport_grader'));
-
- $row[] = new tabobject('preferences',
- $CFG->wwwroot.'/grade/report/grader/preferences.php?id='.$courseid,
- get_string('preferences'));
+ if (has_capability('moodle/grade:manage', get_context_instance(CONTEXT_COURSE, $COURSE->id))) {
+ $row[] = new tabobject('preferences',
+ $CFG->wwwroot.'/grade/report/grader/preferences.php?id='.$courseid,
+ get_string('preferences'));
+ }
$tabs[] = $row;
echo '<div class="gradedisplay">';
$string['changesitedefaults'] = 'Change site defaults';
$string['choosecategory'] = 'Select Category';
$string['compact'] = 'Compact';
+$string['completeaverage'] = 'Complete average';
$string['configaggregationposition'] = 'The position of the aggregation column in the grader report table, in reference to the real grades.';
$string['configaggregationview'] = 'Each category can be displayed in three ways: Full mode (aggregated column and grade item columns), the aggregated column only, or the grade items alone.';
$string['configaveragesdecimalpoints'] = 'The number of decimal points to display for each average (group or whole), below a column of grades. This can be overriden per grading item.';
background-color: #dddddd;
}
+.grade-report-grader .gradestable tr.avg td.cell {
+ background-color: #efefff;
+}
+
+.grade-report-grader .gradestable tr.groupavg td.cell {
+ background-color: #efffef;
+}
/***
*** Login
***/
font-size: 0.7em;
}
+.grade-report-grader .gradestable tr.groupavg td.cell {
+ font-weight: bold;
+ color: #006400;
+}
+.grade-report-grader .gradestable tr.avg td.cell {
+ font-weight: bold;
+ color: #00008B;
+
+}
/***
*** Login
***/