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

sakharuk lon-capa-cvs@mail.lon-capa.org
Tue, 27 May 2003 19:00:36 -0000


sakharuk		Tue May 27 15:00:36 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
   Added a course parameter hash value which allows to split problem over pages. See comments for structuretags.pm last submission. 
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.183 loncom/interface/lonprintout.pm:1.184
--- loncom/interface/lonprintout.pm:1.183	Thu May 15 17:51:00 2003
+++ loncom/interface/lonprintout.pm	Tue May 27 15:00:35 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.183 2003/05/15 21:51:00 albertel Exp $
+# $Id: lonprintout.pm,v 1.184 2003/05/27 19:00:35 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -500,7 +500,8 @@
 
 
 sub output_data {
-    my ($r,$helper) = @_;
+    my ($r,$helper,$rparmhash) = @_;
+    my %parmhash = %$rparmhash;
     $r->print(<<ENDPART);
 <html>
 <head>
@@ -599,6 +600,7 @@
 	    $form{'grade_target'}='tex';
 	    $form{'textwidth'}=$LaTeXwidth;
 	    $form{'symb'}=$master_seq[$i];
+            $form{'problem_split'}=$parmhash{'problem_stream_switch'};
 	    #&Apache::lonnet::logthis("Trying to get $urlp with symb $master_seq[$i]");
 	    my $texversion=&Apache::lonnet::ssi($urlp,%form);
 	    if ($urlp=~/\.page$/) {
@@ -797,8 +799,17 @@
 #	    $r->print(' '.$key.'->'.$helper->{'VARS'}->{$key}.'<-<br />');
 #	}
 #	return OK;
-	
-    &output_data($r,$helper);
+
+    my %parmhash=&Apache::lonnet::coursedescription($ENV{'request.course.id'});
+#    $r->print('<br /> START '.$ENV{'request.course.fn'}.' FINISH <br />');
+#    my $key; 
+#    foreach $key (keys %parmhash) {
+#	$r->print(' '.$key.'->'.$parmhash{$key}.'<-<br />');
+#    }
+#    return OK;
+    
+
+    &output_data($r,$helper,\%parmhash);
     return OK;
 }