I know that someone will call the existing behavior a "feature" of the user report, but when a teacher goes to this report, they get their their own personal grades (even when they are not a graded user). This is useless. They should get the grade reports of all their students instead, which would be extremely helpful. It is true that someone could write a new report, but since this is the default report shipping with 1.9, it should have the desirable behavior, IMO.
To fix, change in \grade\report\user\index.php
--------------------------------------
// Create a report instance
$report = new grade_report_user($courseid, $gpr, $context, $userid);
// print the page
print_heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
if ($report->fill_table())
{ echo $report->print_table(true); }-------------------------------------------
to
----------------------------------------
if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all student reports
$gui = new graded_users_iterator($course);
$gui->init();
if(!isset($gui->grade_items)) $gui->grade_items = array();
while ($userdata = $gui->next_user()) {
$user = $userdata->user;
$report = new grade_report_user($courseid, $gpr, $context, $user->id);
print_heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
if ($report->fill_table()) { echo $report->print_table(true); }
echo "<p style = 'page-break-after: always;'></p>";
}
$gui->close();
}else //Students will see just their own report
{
// Create a report instance
$report = new grade_report_user($courseid, $gpr, $context, $userid);
// print the page
print_heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
if ($report->fill_table()) { echo $report->print_table(true); }
}
-------------------------------------------
With thanks to our school's (Seattle Academy) Server Administrator Karlene Clapp for the start of this patch
- has been marked as being related by
-
MDL-13454 Grade exports missing some grades
-
- Closed
-