MDL-46567 gradereport_history: Prevent duplicate username column from rendering

Part of MDL-46191
This commit is contained in:
Matthew Tavella
2014-08-22 10:31:30 +08:00
committed by Ankit Agarwal
parent 56793e6ce5
commit f7744e915a
+8
View File
@@ -382,6 +382,10 @@ class grade_report_history extends grade_report {
$row->cells[] = $previousgrade;
$row->cells[] = $record->finalgrade;
foreach ($extrafields as $field) {
// BASE-445 - do not show an additional username column
if ($field == 'username') {
continue;
}
$row->cells[] = $this->users[$record->userid]->$field;
}
$namecell = new html_table_cell();
@@ -458,6 +462,10 @@ class grade_report_history extends grade_report {
}
foreach ($extrafields as $field) {
// BASE-445 - do not show an additional username column
if ($field == 'username') {
continue;
}
$fieldheader = new html_table_cell();
$fieldheader->attributes['class'] = 'header userfield user' . $field;
$fieldheader->scope = 'col';