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

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 21 Sep 2002 00:08:17 -0000


albertel		Fri Sep 20 20:08:17 2002 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - I think this better as per the comments in BUG#736
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.51 loncom/homework/grades.pm:1.52
--- loncom/homework/grades.pm:1.51	Fri Sep 20 19:46:41 2002
+++ loncom/homework/grades.pm	Fri Sep 20 20:08:17 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.51 2002/09/20 23:46:41 albertel Exp $
+# $Id: grades.pm,v 1.52 2002/09/21 00:08:17 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1584,12 +1584,22 @@
 	'<input type="hidden" name="url"     value="'.$url.'" />'."\n".
 	'<input type="hidden" name="command" value="editgrades" />'."\n".
 	'<input type="hidden" name="section" value="'.$ENV{'form.section'}.'" />'."\n";
-    $result.='To assign the same score for all the students use the radio buttons or '.
-	'text box below. To assign scores individually fill in the score boxes for '.
-	'each student in the table below. <font color="red">A part that has already '.
-	'been graded does not get changed using the radio buttons or text box. '.
-	'If needed, it has to be changed individually.</font>';
-
+    $result.='<h3>Assign Common Grade To ';
+    if ($ENV{'form.section'} eq 'all') {
+	$result.='Class </h3>';
+    } elsif ($ENV{'form.section'} eq 'no') {
+	$result.='Students in no Section </h3>';
+    } else {
+	$result.='Students in Section '.$ENV{'form.section'}.'</h3>';
+    }
+    $result.= '<table border=0><tr><td bgcolor="#777777">'."\n".
+	'<table border=0><tr bgcolor="#ffffdd"><td>';
+#    $result.='To assign the same score for all the students use the radio buttons or '.
+#	'text box below. To assign scores individually fill in the score boxes for '.
+#	'each student in the table below. <font color="red">A part that has already '.
+#	'been graded does not get changed using the radio buttons or text box. '.
+#	'If needed, it has to be changed individually.</font>';
+#    $result.='</td></tr><tr><td>';
     #radio buttons/text box for assigning points for a section or class.
     #handles different parts of a problem
     my ($partlist,$handgrade) = &response_type($ENV{'form.url'});
@@ -1631,7 +1641,8 @@
 	    '<option>excused</option></select></td></tr>'."\n";
 	$ctsparts++;
     }
-    $result.='</table><input type="hidden" name="totalparts" value="'.$ctsparts.'" />';
+    $result.='</table>'.'</td></tr></table>'.'</td></tr></table>'."\n".
+	'<input type="hidden" name="totalparts" value="'.$ctsparts.'" />';
     $result.='<input type="button" value="Reset" '.
 	'onClick="javascript:resetEntry('.$ctsparts.');" TARGET=_self> &nbsp; &nbsp;';
     $result.='<input type="button" value="Submit Changes" '.
@@ -1639,6 +1650,14 @@
 
     #table listing all the students in a section/class
     #header of table
+    $result.= '<h3>Assign Grade to Specific Students in ';
+    if ($ENV{'form.section'} eq 'all') {
+	$result.='the Class </h3>';
+    } elsif ($ENV{'form.section'} eq 'no') {
+	$result.='no Section </h3>';
+    } else {
+	$result.='Section '.$ENV{'form.section'}.'</h3>';
+    }
     $result.= '<table border=0><tr><td bgcolor="#777777">'."\n".
 	'<table border=0><tr bgcolor="#deffff">'.
 	'<td><b>Fullname</b></td><td><b>Username</b></td><td><b>Domain</b></td>'."\n";
@@ -2116,7 +2135,7 @@
     my ($classlist,$sections) = &getclasslist('all','0');
     my $result.='<table width=100% border=0><tr><td bgcolor=#777777>'."\n";
     $result.='<table width=100% border=0><tr bgcolor="#e6ffff"><td>'."\n";
-    $result.='&nbsp;<b>Grade Entire Class</b></td></tr>'."\n";
+    $result.='&nbsp;<b>Grade Entire Section or Class</b></td></tr>'."\n";
     $result.='<tr bgcolor=#ffffe6><td>'."\n";
     $result.='<form action="/adm/grades" method="post">'."\n".
 	'<input type="hidden" name="symb" value="'.$symb.'" />'."\n".