[LON-CAPA-cvs] cvs: loncom /homework grades.pm

www lon-capa-cvs-allow@mail.lon-capa.org
Thu, 27 Sep 2007 19:44:52 -0000


www		Thu Sep 27 15:44:52 2007 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  Give some sort of optical clue where one student ends and the other starts
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.440 loncom/homework/grades.pm:1.441
--- loncom/homework/grades.pm:1.440	Mon Sep 10 19:03:35 2007
+++ loncom/homework/grades.pm	Thu Sep 27 15:44:51 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.440 2007/09/10 23:03:35 albertel Exp $
+# $Id: grades.pm,v 1.441 2007/09/27 19:44:51 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1706,7 +1706,6 @@
     $udom = ($udom eq '' ? $env{'user.domain'} : $udom); #has form.userdom changed for a student?
     my $usec = &Apache::lonnet::getsection($udom,$uname,$env{'request.course.id'});
     $env{'form.fullname'} = &Apache::loncommon::plainname($uname,$udom,'lastname') if $env{'form.fullname'} eq '';
-
     my $symb = &get_symb($request); 
     if ($symb eq '') { $request->print("Unable to handle ambiguous references:."); return ''; }
 
@@ -1759,7 +1758,7 @@
 	    &Apache::lonxml::clear_problem_counter();
 	    $request->print(&show_problem($request,$symb,$uname,$udom,0,1,$mode));
 	}
-	
+
 	# kwclr is the only variable that is guaranteed to be non blank 
         # if this subroutine has been called once.
 	my %keyhash = ();
@@ -1844,8 +1843,13 @@
         }
     }
 
+# This is where output for one specific student would start
+    my $bgcolor='#DDEEDD';
+    if (int($counter/2) eq $counter) { $bgcolor='#DDDDEE'; }
+    $request->print("\n\n".
+                    '<p><table border="2"><tr><th bgcolor="'.$bgcolor.'">'.$env{'form.fullname'}.'</th></tr><tr><td bgcolor="'.$bgcolor.'">');
+
     if ($env{'form.vProb'} eq 'all' or $env{'form.vAns'} eq 'all') {
-	$request->print('<br /><br /><br />') if ($counter > 0);
 	my $mode;
 	if ($env{'form.vProb'} eq 'all' && $env{'form.vAns'} eq 'all') {
 	    $mode='both';
@@ -2115,6 +2119,11 @@
     }
     $request->print($result.'</td></tr></table></td></tr></table>'."\n");
 
+# Done with printing info for one student
+
+    $request->print('</td></tr></table></p>');
+
+
     # print end of form
     if ($counter == $total) {
 	my $endform='<table border="0"><tr><td>'."\n";