The number of submissions in the Group average and Course average calculations
should be shown in brackets. (submissions) should be added after the Group average
and Course average labels.
Solution:
new grader report preference (Display number of grades in average cells).
$averagesdisplaytype = $this->get_pref('averagesdisplaytype');
$averagesdecimalpoints = $this->get_pref('averagesdecimalpoints');
- $meanselection = $this->get_pref('meanselection');
+ $meanselection = $this->get_pref('meanselection');
+ $shownumberofgrades = $this->get_pref('shownumberofgrades');
+
$avghtml = '';
$avgcssclass = 'avg';
$gradehtml = grade_grade::get_letter($letters, $gradeval, $item->grademin, $item->grademax);
}
- $avghtml .= '<td class="cell c' . $columncount++.'">'.$gradehtml.'</td>';
+ $numberofgrades = '';
+
+ if ($shownumberofgrades) {
+ $numberofgrades = " ($mean_count)";
+ }
+
+ $avghtml .= '<td class="cell c' . $columncount++.'">'.$gradehtml.$numberofgrades.'</td>';
}
}
$avghtml .= '</tr>';
'showactivityicons' => $checkbox_default);
$preferences['prefrows'] = array(
+ 'shownumberofgrades' => $checkbox_default,
'averagesdisplaytype' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
$settings->add(new admin_setting_configcheckbox('grade_report_showactivityicons', get_string('showactivityicons', 'grades'),
get_string('configshowactivityicons', 'grades'), 1));
+$settings->add(new admin_setting_configcheckbox('grade_report_shownumberofgrades', get_string('shownumberofgrades', 'grades'),
+ get_string('configshownumberofgrades', 'grades'), 0));
+
$settings->add(new admin_setting_configselect('grade_report_averagesdisplaytype', get_string('averagesdisplaytype', 'grades'),
get_string('configaveragesdisplaytype', 'grades'), false,
array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
<?PHP // $Id$
-$plugin->version = 2007081001;
-$plugin->requires = 2007081001;
+$plugin->version = 2007091400;
+$plugin->requires = 2007091400;
?>
$string['configshowgroups'] = 'Show group averages and means in the grader report.';
$string['configshowlocks'] = 'Whether to show a lock/unlock icon near each grade.';
$string['configshowfeedback'] = 'Whether to show a feedback icon (for adding/editing) near each grade.';
+$string['configshownumberofgrades'] = 'Shows the number of grades being aggregated next to each average, between brackets. Example: 45 (34).';
$string['configshowranges'] = 'Display a row showing the range of possible for each grading item in the grader report.';
$string['configshowuserimage'] = 'Whether to show the user\'s profile image next to the name in the grader report.';
$string['configstudentsperpage'] = 'The number of students to display per page in the grader report.';
$string['showhiddenitems'] = 'Show Hidden Items';
$string['showlocks'] = 'Show locks';
$string['shownooutcomes'] = 'Hide outcomes';
+$string['shownumberofgrades'] = 'Show number of grades in averages';
$string['showranges'] = 'Show ranges';
$string['showuserimage'] = 'Show user profile images';
$string['sitedefault'] = 'Site default ($a)';
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2007090600; // YYYYMMDD = date
+ $version = 2007091400; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.9 Beta +'; // Human-friendly version name