--- loncom/homework/grades.pm	2007/10/09 23:42:49	1.451
+++ loncom/homework/grades.pm	2007/10/11 22:34:33	1.454
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.451 2007/10/09 23:42:49 albertel Exp $
+# $Id: grades.pm,v 1.454 2007/10/11 22:34:33 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -526,12 +526,18 @@ sub getclasslist {
 	    }
 	}
 	# filter students according to groups selected
+	my @stu_groups = split(/,/,$group);
 	if (@getgroup) {
 	    my $exclude = 1;
-	    foreach my $grp(@getgroup) {
-	        if ($group eq $grp) {
-	            $exclude = 0;
+	    foreach my $grp (@getgroup) {
+	        foreach my $stu_group (@stu_groups) {
+	            if ($stu_group eq $grp) {
+	                $exclude = 0;
+    	            } 
 	        }
+    	        if (($grp eq 'none') && !$group) {
+        	        $exclude = 0;
+        	}
 	    }
 	    if ($exclude) {
 	        delete($classlist->{$student});
@@ -970,7 +976,7 @@ LISTJAVASCRIPT
 
 	$ctr++;
 	my $section = $classlist->{$student}->[&Apache::loncoursedata::CL_SECTION()];
-
+        my $group = $classlist->{$student}->[&Apache::loncoursedata::CL_GROUP()];
 	if ( $perm{'vgr'} eq 'F' ) {
 	    $gradeTable.='<tr bgcolor="#ffffe6">' if ($ctr%2 ==1);
 	    $gradeTable.='<td align="right">'.$ctr.'&nbsp;</td>'.
@@ -978,7 +984,7 @@ LISTJAVASCRIPT
                $student.':'.$$fullname{$student}.':::SECTION'.$section.
 	       ')&nbsp;" />&nbsp;&nbsp;</label></td>'."\n".'<td>'.
 	       &nameUserString(undef,$$fullname{$student},$uname,$udom).
-	       '&nbsp;'.$section.'</td>'."\n";
+	       '&nbsp;'.$section.'/'.$group.'</td>'."\n";
 
 	    if ($env{'form.showgrading'} eq 'yes' && $submitonly ne 'all') {
 		foreach (sort keys(%status)) {
@@ -6319,7 +6325,7 @@ sub scantron_validate_ID {
 sub scantron_get_correction {
     my ($r,$i,$scan_record,$scan_config,$line,$error,$arg)=@_;
 
-#FIXME in the case of a duplicated ID the previous line, probaly need
+#FIXME in the case of a duplicated ID the previous line, probably need
 #to show both the current line and the previous one and allow skipping
 #the previous one or the current one
 
@@ -7217,7 +7223,13 @@ sub grading_menu {
     $fields{'command'} = 'scantron_selectphase';
     $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
     push (@menu, { url => $url,
-                   name => &mt('Grade Scantron Forms'),
+                   name => &mt('Grade/Manage Scantron Forms'),
+                   short_description => 
+            &mt('')});
+    $fields{'command'} = 'codelist';
+    $url = &Apache::lonhtmlcommon::build_url('/adm/pickcode',\%fields);
+    push (@menu, { url => $url,
+                   name => &mt('View Saved CODEs'),
                    short_description => 
             &mt('')});
     $fields{'command'} = 'verify';
@@ -7227,18 +7239,6 @@ sub grading_menu {
                    name => &mt('Verify Receipt'),
                    short_description => 
             &mt('')});
-    $fields{'command'} = 'manage';
-    $url = &Apache::lonhtmlcommon::build_url('/adm/helper/resettimes.helper',\%fields);
-    push (@menu, { url => $url,
-                   name => &mt('Manage Access Times'),
-                   short_description => 
-            &mt('')});
-    $fields{'command'} = 'view';
-    $url = &Apache::lonhtmlcommon::build_url('/adm/pickcode',\%fields);
-    push (@menu, { url => $url,
-                   name => &mt('View Saved CODEs'),
-                   short_description => 
-            &mt('')});
 
     #
     # Create the menu
@@ -8030,7 +8030,6 @@ ENDHEADER
 
 sub handler {
     my $request=$_[0];
-
     &reset_caches();
     if ($env{'browser.mathml'}) {
 	&Apache::loncommon::content_type($request,'text/xml');