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

sakharuk lon-capa-cvs@mail.lon-capa.org
Fri, 02 May 2003 14:17:57 -0000


sakharuk		Fri May  2 10:17:57 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Now you can print the primary sequence with only problems or with everything else. In addition you can easily print the problems from the whole course (or from part of the course). To print problems from the part of the course we added additional menu (thanks Jeremy). But the navmap menu for item #3 (the same as for item #2 - see previous submission) contains more information than we really need and has to be changed.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.141 loncom/interface/lonprintout.pm:1.142
--- loncom/interface/lonprintout.pm:1.141	Fri May  2 09:39:04 2003
+++ loncom/interface/lonprintout.pm	Fri May  2 10:17:57 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.141 2003/05/02 13:39:04 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.142 2003/05/02 14:17:57 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1417,7 +1417,9 @@
       }
 
 
-    } elsif ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') { 
+    } elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or
+             ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') or
+             ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_problems')) { 
         #-- produce an output string
 	my $flag_latex_header_remove = 'NO';
 	my $flag_page_in_sequence = 'NO';
@@ -1432,9 +1434,11 @@
 	    $master_seq[$i]=~/___\d+___(.*)$/;
 	    my $urlp='/res/'.$1;
 	    if ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') {
-              $selectionmade = 2;
-#	    } elsif ($choice eq 'Standard LaTeX output for whole primary sequence') {
-#              $selectionmade = 3;
+		$selectionmade = 2;
+	    } elsif ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') {
+		$selectionmade = 3;
+	    } elsif ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_problems') {
+		$selectionmade = 4;
 	    }
 	    my %moreenv;
 	    $moreenv{'form.grade_target'}='tex';
@@ -1659,7 +1663,7 @@
         $helper = $result;
     
 
-    my $key; 
+#    my $key; 
 #    foreach $key (keys %{$helper->{'VARS'}}) {
 #	$r->print(' '.$key.'->'.$helper->{'VARS'}->{$key}.'<br />');
 #    }