Index: moodle/grade/report/grader/lib.php
--- moodle/grade/report/grader/lib.php Base (1.98.2.68)
+++ moodle/grade/report/grader/lib.php Locally Modified (Based On 1.98.2.68)
@@ -658,9 +658,17 @@
                     }
 
                     $headerlink = $this->gtree->get_element_header($element, true, $this->get_pref('showactivityicons'), false);
+                    //need to distinguish between 2 different styling for fixedstudents.
+                    // $fixedstudents == 0, students and grades display in the same table.
+                    // $fixedstudents == 1, students and grades are display in separate table.
+                    if ($fixedstudents) {
+                        $incrementcellindex = '';
+                    } else {
+                        $incrementcellindex = '+1';
+                    }
                     //MDL-21088 - IE 7 ignores nowraps on tds or ths so we this in a span with a nowrap on it.
-                    $headerhtml .= '<th class=" '.$columnclass.' '.$type.$catlevel.$hidden.'" scope="col" onclick="set_col(this.cellIndex)"><span>'
-                                .shorten_text($headerlink) . $arrow;
+                    $headerhtml .= '<th class=" '.$columnclass.' '.$type.$catlevel.$hidden.'" scope="col" onclick="set_col(this.cellIndex' . $incrementcellindex . ')"><span>'
+                                . shorten_text($headerlink) . $arrow;
                     $headerhtml .= '</span></th>';
                 }
 
