[LON-CAPA-cvs] cvs: loncom(version_2_1_X) /interface lonprintout.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 23 Dec 2005 08:34:44 -0000


albertel		Fri Dec 23 03:34:44 2005 EDT

  Modified files:              (Branch: version_2_1_X)
    /loncom/interface	lonprintout.pm 
  Log:
  - backport 1.411 adn 1.412
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.408 loncom/interface/lonprintout.pm:1.408.2.1
--- loncom/interface/lonprintout.pm:1.408	Thu Dec 15 16:10:30 2005
+++ loncom/interface/lonprintout.pm	Fri Dec 23 03:34:43 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.408 2005/12/15 21:10:30 albertel Exp $
+# $Id: lonprintout.pm,v 1.408.2.1 2005/12/23 08:34:43 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2175,11 +2175,9 @@
 	}
 
 
-        my %all_codes = &Apache::lonnet::get('CODEs',
-					     \@names, $cdom,$cnum);
 	my %code_values;
 	my %codes_to_print;
-	foreach my $key (keys(%all_codes)) {
+	foreach my $key (@names) {
 	    %code_values = &Apache::grades::get_codes($key, $cdom, $cnum);
 	    foreach my $key (keys(%code_values)) {
 		$codes_to_print{$key} = 1;
@@ -2210,8 +2208,7 @@
         &Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_ANON1);
   <state name="CHOOSE_ANON1" title="Select Students and Resources">
     <nextstate>PAGESIZE</nextstate>
-    <message><hr width='33%' /></message>
-    <message><table><tr><td><b>Number of anonymous assignments to print?</b></td><td></message>
+    <message><table><tr><td><b>Number of anonymous assignments to print:</b></td><td></message>
     <string variable="NUMBER_TO_PRINT_TOTAL" maxlength="5" size="5">
        <validator>
 	if (((\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'}+0) < 1) &&
@@ -2224,8 +2221,19 @@
        </validator>
     </string>
     <message></td></tr><tr><td></message>
-    <message><b>Value of CODE to print?</b></td><td></message>
-    <string variable="SINGLE_CODE" size="10" defaultvalue="zzzz">
+    <message><b>Names to store the CODEs under for later:</b></message>
+    <message></td><td></message>
+    <string variable="ANON_CODE_STORAGE_NAME" maxlength="50" size="20" />
+    <message></td></tr><tr><td></message>
+    <message><b>Bubble sheet type:</b></message>
+    <message></td><td></message>
+    <dropdown variable="CODE_OPTION" multichoice="0" allowempty="0">
+    $codechoice
+    </dropdown>
+    <message></td></tr><tr><td colspan="2"><hr width='33%' /></td></tr><tr><td></message>
+    <message></td></tr><tr><td></message>
+    <message><b>Enter a CODE to print:</b></td><td></message>
+    <string variable="SINGLE_CODE" size="10">
         <validator>
 	   if(!\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'}           &&
 	      !\$helper->{'VARS'}{'REUSE_OLD_CODES'}                 &&
@@ -2237,28 +2245,13 @@
 	   }
         </validator>
     </string>
-    <message></td></tr><tr><td></message>
-    <message><b>Choose single code from list</b></message>
-    <message></td><td></message>
-    <dropdown variable="CODE_SELECTED_FROM_LIST" multichoice="0" allowempty="0">
-    $code_selection
-    </dropdown>
-    <message></td></tr><tr><td></message>
-    <message><b>Names to store the CODEs under for later:</b></message>
-    <message></td><td></message>
-    <string variable="ANON_CODE_STORAGE_NAME" maxlength="50" size="20" />
-    <message></td></tr><tr><td></message>
-    <message><b>Bubble sheet type:</b></message>
-    <message></td><td></message>
-    <dropdown variable="CODE_OPTION" multichoice="0" allowempty="0">
-    $codechoice
-    </dropdown>
-    <message></td></tr></table></message>
-    <message><hr width='33%' /></message>
+    <message></td></tr><tr><td colspan="2"><hr width='33%' /></td></tr><tr><td></message>
     <message><b>Reprint a set of saved CODEs:</b></message>
+    <message></td><td></message>
     <dropdown variable="REUSE_OLD_CODES">
         $namechoice
     </dropdown>
+    <message></td></tr></table></message>
     <message><hr width='33%' /></message>
     $resource_selector
   </state>
@@ -2306,7 +2299,7 @@
 	&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_ANON2);
   <state name="CHOOSE_ANON2" title="Select Students and Resources">
     <nextstate>PAGESIZE</nextstate>
-    <message><table><tr><td><b>Number of anonymous assignments to print?</b></td><td></message>
+    <message><table><tr><td><b>Number of anonymous assignments to print:</b></td><td></message>
     <string variable="NUMBER_TO_PRINT_TOTAL" maxlength="5" size="5">
        <validator>
 	if (((\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'}+0) < 1) &&
@@ -2319,8 +2312,19 @@
        </validator>
     </string>
     <message></td></tr><tr><td></message>
-    <message><b>Value of CODE to print?</b></td><td></message>
-    <string variable="SINGLE_CODE" size="10" defaultvalue="zzzz">
+    <message><b>Names to store the CODEs under for later:</b></message>
+    <message></td><td></message>
+    <string variable="ANON_CODE_STORAGE_NAME" maxlength="50" size="20" />
+    <message></td></tr><tr><td></message>
+    <message><b>Bubble sheet type:</b></message>
+    <message></td><td></message>
+    <dropdown variable="CODE_OPTION" multichoice="0" allowempty="0">
+    $codechoice
+    </dropdown>
+    <message></td></tr><tr><td colspan="2"><hr width='33%' /></td></tr><tr><td></message>
+    <message></td></tr><tr><td></message>
+    <message><b>Enter a CODE to print:</b></td><td></message>
+    <string variable="SINGLE_CODE" size="10">
         <validator>
 	   if(!\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'}           &&
 	      !\$helper->{'VARS'}{'REUSE_OLD_CODES'}                 &&
@@ -2332,28 +2336,13 @@
 	   }
         </validator>
     </string>
-    <message></td></tr><tr><td></message>
-    <message><b>Choose single code from list</b></message>
-    <message></td><td></message>
-    <dropdown variable="CODE_SELECTED_FROM_LIST" multichoice="0" allowempty="0">
-    $code_selection
-    </dropdown>
-    <message></td></tr><tr><td></message>
-    <message><b>Names to store the CODEs under for later:</b></message>
-    <message></td><td></message>
-    <string variable="ANON_CODE_STORAGE_NAME" maxlength="50" size="20" />
-    <message></td></tr><tr><td></message>
-    <message><b>Bubble sheet type:</b></message>
-    <message></td><td></message>
-    <dropdown variable="CODE_OPTION" multichoice="0" allowempty="0">
-    $codechoice
-    </dropdown>
-    <message></td></tr></table></message>
-    <message><hr width='33%' /></message>
+    <message></td></tr><tr><td colspan="2"><hr width='33%' /></td></tr><tr><td></message>
     <message><b>Reprint a set of saved CODEs:</b></message>
+    <message></td><td></message>
     <dropdown variable="REUSE_OLD_CODES">
         $namechoice
     </dropdown>
+    <message></td></tr></table></message>
     <message><hr width='33%' /></message>
     $resource_selector
   </state>