diff --git a/grade/report/grader/lib.php b/grade/report/grader/lib.php
index 856eb4516c7..a7de308ce2a 100644
--- a/grade/report/grader/lib.php
+++ b/grade/report/grader/lib.php
@@ -732,16 +732,21 @@ class grade_report_grader extends grade_report {
$user_pic = '
' . print_user_picture($user, $this->courseid, null, 0, true) . '
';
}
+ //we're either going to add a th or a colspan to keep things aligned
$userreportcell = '';
+ $userreportcellcolspan = '';
if (has_capability('gradereport/'.$CFG->grade_profilereport.':view', $this->context)) {
$a->user = fullname($user);
$strgradesforuser = get_string('gradesforuser', 'grades', $a);
$userreportcell = '';
}
+ else {
+ $userreportcellcolspan = 'colspan=2';
+ }
$studentshtml .= ''
- .'| '.$user_pic
+ .' | '.$user_pic
.''
.fullname($user)." | $userreportcell\n";
@@ -1014,16 +1019,21 @@ class grade_report_grader extends grade_report {
$user_pic = '' . print_user_picture($user, $this->courseid, NULL, 0, true) . "
\n";
}
+ //either add a th or a colspan to keep things aligned
$userreportcell = '';
+ $userreportcellcolspan = '';
if (has_capability('gradereport/'.$CFG->grade_profilereport.':view', $this->context)) {
$a->user = fullname($user);
$strgradesforuser = get_string('gradesforuser', 'grades', $a);
$userreportcell = ''
.' | ';
}
+ else {
+ $userreportcellcolspan = 'colspan=2';
+ }
$studentshtml .= '
'
- .'| '.$user_pic
+ .' | '.$user_pic
.''
.fullname($user)." | $userreportcell\n";
@@ -1174,9 +1184,6 @@ class grade_report_grader extends grade_report {
}
$avghtml .= '';
}
- if (has_capability('gradereport/'.$CFG->grade_profilereport.':view', $this->context)) {
- $avghtml .= '';
- }
foreach ($this->gtree->items as $itemid=>$unused) {
$item =& $this->gtree->items[$itemid];
@@ -1262,7 +1269,7 @@ class grade_report_grader extends grade_report {
$fixedstudents = $this->is_fixed_students();
if (!$fixedstudents) {
$colspan='colspan="2" ';
- if ($this->get_pref('showuseridnumber')) {
+ if ($this->get_pref('showuseridnumber')) {
$colspan = 'colspan="3" ';
}
$rangehtml .= '';