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

sakharuk lon-capa-cvs@mail.lon-capa.org
Wed, 19 Feb 2003 15:14:54 -0000


sakharuk		Wed Feb 19 10:14:54 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
   Changes are:
  	1. Added \newpage command after printoutput for a particular student;
  	2. Corrected enumeration (currently it starts from 1 but after conversation with Ed I probably change the initial value - he has to define how many lines will be used for coding of student's name) which starts from the initial value for every students if you use item All problems from "..." for selected students (see lonxml.pm too).
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.117 loncom/interface/lonprintout.pm:1.118
--- loncom/interface/lonprintout.pm:1.117	Mon Feb 17 11:43:54 2003
+++ loncom/interface/lonprintout.pm	Wed Feb 19 10:14:54 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.117 2003/02/17 16:43:54 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.118 2003/02/19 15:14:54 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -612,7 +612,7 @@
 	foreach my $person (@students) {
 	    my $current_output = ''; 
 	    my ($usersection,$username,$userdomain) = split /:/,$person;
-	    my $fullname = &Apache::grades::get_fullname($username,$userdomain);
+	    my $fullname = &Apache::grades::get_fullname($username,$userdomain);    
             #goes through all resources, checks if they are available for current student, and produces output   
 	    foreach my $curresline (@master_seq)  {
 		my ($curres,$symb) = split /&&/, $curresline;
@@ -637,10 +637,11 @@
 	    } else {
 		my $blanspages = '';
 		for (my $j=0;$j<$ENV{'form.addedpages'};$j++) {$blanspages.='\clearpage\strut\clearpage';}
-		$current_output = '\strut\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\\newline\\noindent{\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License } \\vskip 3mm'.$blanspages.'\setcounter{page}{1}\noindent\parbox{\minipagewidth}{\noindent\\lhead{\\textit{\\textbf{'.$fullname.'}} - '.$courseidinfo.' \\hfill \\thepage \\\\ \\textit{'.$assignment.'}}\hskip 1.4in } \vskip 5 mm '.$current_output;
+		$current_output = '\strut\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\\newline\\noindent{\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License }\\newpage \\vskip 3mm'.$blanspages.'\setcounter{page}{1}\noindent\parbox{\minipagewidth}{\noindent\\lhead{\\textit{\\textbf{'.$fullname.'}} - '.$courseidinfo.' \\hfill \\thepage \\\\ \\textit{'.$assignment.'}}\hskip 1.4in } \vskip 5 mm '.$current_output;
 	    }
 	    $result .= $current_output;
-	    &Apache::lonnet::delenv('form.counter');
+	    &Apache::lonnet::delenv('form.counter');	    
+	    &Apache::lonxml::init_counter(); 
 	}
 	$result .= '\end{document}';
 	&Apache::lonnet::delenv('form.textwidth');