Index: moodle/grade/report/grader/lib.php
--- moodle/grade/report/grader/lib.php Base (1.98.2.66)
+++ moodle/grade/report/grader/lib.php Locally Modified (Based On 1.98.2.66)
@@ -657,7 +657,16 @@
                     }
 
                     $headerlink = $this->gtree->get_element_header($element, true, $this->get_pref('showactivityicons'), false);
-                    $headerhtml .= '<th class=" '.$columnclass.' '.$type.$catlevel.$hidden.'" scope="col" onclick="set_col(this.cellIndex)">'
+                    
+                    //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';
+                    }
+                    $headerhtml .= '<th class=" '.$columnclass.' '.$type.$catlevel.$hidden.'" scope="col" onclick="set_col(this.cellIndex' . $incrementcellindex . ')">'
                                 . shorten_text($headerlink) . $arrow;
                     $headerhtml .= '</th>';
                 }
Index: moodle/lang/en_utf8/assignment.php
--- moodle/lang/en_utf8/assignment.php Base (1.14.2.11)
+++ moodle/lang/en_utf8/assignment.php Locally Modified (Based On 1.14.2.11)
@@ -139,4 +139,6 @@
 $string['viewsubmissions'] = 'View $a submitted assignments';
 $string['yoursubmission'] = 'Your submission';
 
+$string['requiregrading'] = 'Require grading';
+$string['filtersubmissionoption'] = 'Select submissions...';
 ?>
Index: moodle/mod/assignment/lib.php
--- moodle/mod/assignment/lib.php Base (1.277.2.54)
+++ moodle/mod/assignment/lib.php Locally Modified (Based On 1.277.2.54)
@@ -783,6 +783,7 @@
 
         $userid = required_param('userid', PARAM_INT);
         $offset = required_param('offset', PARAM_INT);//offset for where to start looking for student.
+        $filter = optional_param('filter', 'all', PARAM_TEXT);
 
         if (!$user = get_record('user', 'id', $userid)) {
             error('No such user!');
@@ -822,15 +823,24 @@
 
         $nextid = 0;
 
+        $where = '';
+        if($filter == 'submitted') {
+            $where .= 's.timemodified > 0 AND ';
+        }
+		
+	if($filter == 'requiregrading') {
+            $where .= 's.timemarked < s.timemodified AND ';
+        }
+
         if ($users) {
             $select = 'SELECT u.id, u.firstname, u.lastname, u.picture, u.imagealt,
                               s.id AS submissionid, s.grade, s.submissioncomment,
                               s.timemodified, s.timemarked,
                               COALESCE(SIGN(SIGN(s.timemarked) + SIGN(s.timemarked - s.timemodified)), 0) AS status ';
             $sql = 'FROM '.$CFG->prefix.'user u '.
-                   'LEFT JOIN '.$CFG->prefix.'assignment_submissions s ON u.id = s.userid
-                                                                      AND s.assignment = '.$this->assignment->id.' '.
-                   'WHERE u.id IN ('.implode(',', $users).') ';
+                   'LEFT JOIN '.$CFG->prefix.'assignment_submissions s ON u.id = s.userid ' .
+                   'AND s.assignment = '.$this->assignment->id.' '.
+                   'WHERE '.$where.'u.id IN ('.implode(',', $users).') ';
 
             if ($sort = flexible_table::get_sql_sort('mod-assignment-submissions')) {
                 $sort = 'ORDER BY '.$sort.' ';
@@ -889,6 +899,9 @@
         echo '<input type="hidden" name="mode" value="grade" />';
         echo '<input type="hidden" name="menuindex" value="0" />';//selected menu index
 
+        //for filter mode
+        echo '<input type="hidden" name="filter" value="'.$filter.'">';
+
         //new hidden field, initialized to -1.
         echo '<input type="hidden" name="saveuserid" value="-1" />';
 
@@ -1011,19 +1024,21 @@
          * to request user_preference updates
          */
 
-        if (isset($_POST['updatepref'])){
+        if (isset($_POST['updatepref']) || isset($_GET['filter'])){
             $perpage = optional_param('perpage', 10, PARAM_INT);
             $perpage = ($perpage <= 0) ? 10 : $perpage ;
             set_user_preference('assignment_perpage', $perpage);
             set_user_preference('assignment_quickgrade', optional_param('quickgrade', 0, PARAM_BOOL));
+            $filter = optional_param('filter', 'all', PARAM_RAW);
+            set_user_preference('assignment_filter', $filter);
         }
 
         /* next we get perpage and quickgrade (allow quick grade) params
          * from database
          */
         $perpage    = get_user_preferences('assignment_perpage', 10);
-
         $quickgrade = get_user_preferences('assignment_quickgrade', 0);
+        $filter = get_user_preferences('assignment_filter', 'all');
 
         $grading_info = grade_get_grades($this->course->id, 'mod', 'assignment', $this->assignment->id);
 
@@ -1145,6 +1160,14 @@
             $where .= ' AND ';
         }
 
+        if($filter == 'submitted') {
+            $where .= 's.timemodified > 0 AND ';
+        }
+		
+	if($filter == 'requiregrading') {
+            $where .= 's.timemarked < s.timemodified AND ';
+        }
+
         if ($sort = $table->get_sql_sort()) {
             $sort = ' ORDER BY '.$sort;
         }
@@ -1158,8 +1181,8 @@
                                                                   AND s.assignment = '.$this->assignment->id.' '.
                'WHERE '.$where.'u.id IN ('.implode(',',$users).') ';
 
-        $table->pagesize($perpage, count($users));
-
+        $ausers = get_records_sql($select.$sql.$sort);
+        $table->pagesize($perpage, count($ausers));
         ///offset used to calculate index of student in that particular query, needed for the pop up to know who's next
         $offset = $page * $perpage;
 
@@ -1272,7 +1295,7 @@
 
                 ///No more buttons, we use popups ;-).
                 $popup_url = '/mod/assignment/submissions.php?id='.$this->cm->id
-                           . '&amp;userid='.$auser->id.'&amp;mode=single'.'&amp;offset='.$offset++;
+                           . '&amp;userid='.$auser->id.'&amp;mode=single'.'&amp;filter='.$filter.'&amp;offset='.$offset++;
                 $button = link_to_popup_window ($popup_url, 'grade'.$auser->id, $buttontext, 600, 780,
                                                 $buttontext, 'none', true, 'button'.$auser->id);
 
@@ -1300,7 +1323,7 @@
                     }
                 }
 
-		 $userlink = '<a href="' . $CFG->wwwroot . '/user/view.php?id=' . $auser->id . '&amp;course=' . $course->id . '">' . fullname($auser) . '</a>';
+		 $userlink = '<a href="' . $CFG->wwwroot . '/user/view.php?id=' . $auser->id . '&amp;course=' . $course->id . '">' . fullname($auser, has_capability('moodle/site:viewfullnames', $this->context)) . '</a>';
                 $row = array($picture, $userlink, $grade, $comment, $studentmodified, $teachermodified, $status, $finalgrade);
                 if ($uses_outcomes) {
                     $row[] = $outcomes;
@@ -1323,6 +1346,22 @@
 
         $table->print_html();  /// Print the whole table
 
+        $filterall = '';
+        $filtersubmitted = '';
+        $filterrequiregrading = '';
+        
+        if ($filter == 'all') {
+            $filterall = ' selected ';
+        }
+
+        if ($filter == 'submitted') {
+            $filtersubmitted = ' selected ';
+        }
+
+        if ($filter == 'requiregrading') {
+            $filterrequiregrading = ' selected ';
+        }
+
         if ($quickgrade){
             $lastmailinfo = get_user_preferences('assignment_mailinfo', 1) ? 'checked="checked"' : '';
             echo '<div class="fgcontrols">';
@@ -1338,13 +1377,28 @@
         }
         /// End of fast grading form
 
-        /// Mini form for setting user preference
-        echo '<div class="qgprefs">';
-        echo '<form id="options" action="submissions.php?id='.$this->cm->id.'" method="post"><div>';
+        //Additional javascript for jumps
+        echo '<script type="text/javascript">'."\n<!--\n";
+        echo 'function invokeSubmit(formid) {'."\n";
+        echo '    var selectedUrl;'."\n";
+        echo '    selectedUrl = document.getElementById(formid).jump.options[document.getElementById(formid).jump.selectedIndex].value;'."\n";
+        echo '    document.getElementById(formid).action = selectedUrl;'."\n";
+        echo '    document.getElementById(formid).submit();'."\n";
+        echo '}'."\n";
+        echo "\n-->\n</script>"."\n";
+
+        echo '<form id="options" action="submissions.php?id='.$this->cm->id.'&amp;filter='.$filter.'" method="post"><div>';
         echo '<input type="hidden" name="updatepref" value="1" />';
+        echo '<label for="_jump">'.get_string('show','moodle').' </label>';
+        echo '<select id="_jump" onchange="invokeSubmit(\'options\')" name="jump">';
+        echo '<option value="'.$CFG->wwwroot.'/mod/assignment/submissions.php?id='.$this->cm->id.'&amp;filter='.strtolower(get_string('all','moodle')).'"'. $filterall .'>'.get_string('all','moodle').'</option>';
+        echo '<option value="'.$CFG->wwwroot.'/mod/assignment/submissions.php?id='.$this->cm->id.'&amp;filter=submitted"'. $filtersubmitted .'>'.get_string('submitted','assignment').'</option>';
+        echo '<option value="'.$CFG->wwwroot.'/mod/assignment/submissions.php?id='.$this->cm->id.'&amp;filter=requiregrading"'. $filterrequiregrading .'>'.get_string('requiregrading','assignment').'</option>';
+        echo '</select>';
+        helpbutton('assignment_filter', get_string('filter','assignment'), 'moodle', true, false, '', false);
         echo '<table id="optiontable">';
         echo '<tr><td>';
-        echo '<label for="perpage">'.get_string('pagesize','assignment').'</label>';
+        echo '<label for="perpage">'.get_string('pagesize','assignment').'&nbsp;</label>';
         echo '</td>';
         echo '<td>';
         echo '<input type="text" id="perpage" name="perpage" size="1" value="'.$perpage.'" />';
@@ -1361,6 +1415,7 @@
         echo '<tr><td colspan="2">';
         echo '<input type="submit" value="'.get_string('savepreferences').'" />';
         echo '</td></tr></table>';
+        echo '<div class="clearer"> </div>';
         echo '</div></form></div>';
         ///End of mini form
         print_footer($this->course);
Index: moodle/theme/standard/styles_layout.css
--- moodle/theme/standard/styles_layout.css Base (1.516.2.81)
+++ moodle/theme/standard/styles_layout.css Locally Modified (Based On 1.516.2.81)
@@ -4301,3 +4307,7 @@
   border: 1px dashed #ddd;
   padding: 3px;
 }
+
+#optiontable {
+    float: right;
+}
