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

foxr lon-capa-cvs-allow@mail.lon-capa.org
Mon, 17 Mar 2008 09:53:37 -0000


foxr		Mon Mar 17 05:53:37 2008 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Reset the encoded URL env. variable prior to each SSI fetch in 
  loops that do multiple SSI calls so that sequences/folders etc.
  with mixed hidden/unhidden URL's will function
  (BZ 5509).
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.520 loncom/interface/lonprintout.pm:1.521
--- loncom/interface/lonprintout.pm:1.520	Tue Mar 11 22:45:07 2008
+++ loncom/interface/lonprintout.pm	Mon Mar 17 05:53:36 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.520 2008/03/12 02:45:07 raeburn Exp $
+# $Id: lonprintout.pm,v 1.521 2008/03/17 09:53:36 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -38,6 +38,7 @@
 use Apache::File();
 use Apache::lonnavmaps;
 use Apache::admannotations;
+use Apache::lonenc;
 use HTTP::Response;
 
 use LONCAPA::map();
@@ -1665,6 +1666,9 @@
 	my $pbreakresources = keys %page_breaks;
 	for (my $i=0;$i<=$#master_seq;$i++) {
 
+	    &Apache::lonenc::reset_enc();
+
+
 	    # Note due to document structure, not allowed to put \newpage
 	    # prior to the first resource
 
@@ -1673,11 +1677,13 @@
 		    $result.="\\newpage\n";
 		}
 	    }
-	    my ($sequence,undef,$urlp)=&Apache::lonnet::decode_symb($master_seq[$i]);
+	    my ($sequence,$middle_thingy,$urlp)=&Apache::lonnet::decode_symb($master_seq[$i]);
 	    $urlp=&Apache::lonnet::clutter($urlp);
 	    $form{'symb'}=$master_seq[$i];
 
+
 	    my $assignment=&Apache::lonxml::latex_special_symbols(&Apache::lonnet::gettitle($sequence),'header'); #title of the assignment which contains this problem
+
 	    if ($selectionmade==7) {$helper->{VARS}->{'assignment'}=$assignment;}
 	    if ($i==0) {$prevassignment=$assignment;}
 	    my $texversion='';
@@ -1984,6 +1990,9 @@
 	    $rndseed=$helper->{'VARS'}->{'curseed'};
 	}
 	for (my $i=0;$i<=$#list_of_files;$i++) {
+
+	    &Apache::lonenc::reset_enc();
+
 	    my $urlp = $list_of_files[$i];
 	    $urlp=~s|//|/|;
 	    if ($urlp=~/\//) {