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

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 20 Oct 2003 18:35:22 -0000


sakharuk		Mon Oct 20 14:35:22 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Some cleanup has been done (for implementing cookie based scheme)
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.256 loncom/interface/lonprintout.pm:1.257
--- loncom/interface/lonprintout.pm:1.256	Mon Oct 20 13:38:51 2003
+++ loncom/interface/lonprintout.pm	Mon Oct 20 14:35:22 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.256 2003/10/20 17:38:51 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.257 2003/10/20 18:35:22 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1063,11 +1063,6 @@
 	$result =~ s/\\evensidemargin = -0\.57in/\\evensidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
 	$result =~ s/\\oddsidemargin = -0\.57in/\\oddsidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
     }
-    if ($helper->{'VARS'}->{'TABLE_CONTENTS'} eq 'yes') {$selectionmade*=10;}
-    if ($helper->{'VARS'}->{'TABLE_INDEX'} eq 'yes') {
-	if ($selectionmade<10) {$selectionmade*=100;} else {$selectionmade*=10;}
-    }
-    if ($ENV{'request.role.adv'}) {$selectionmade*=10000;}
 #-- writing .tex file in prtspool 
     my $temp_file;
     my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout_".time."_".rand(10000000).".tex";
@@ -1076,15 +1071,14 @@
 	return SERVER_ERROR; 
     }
 
-########
     my $identifier = time.'_'.int(rand(1000));
-    &Apache::lonnet::appenv($identifier.'.file'   => $filename,
-                            $identifier.'.layout'  => $laystyle,
-                            $identifier.'.numcol'  => $numberofcolumns,
-                            $identifier.'.selection' => $selectionmade);
-
-##<meta http-equiv="Refresh" content="0; url=/cgi-bin/printout.pl?$filename&$laystyle&$numberofcolumns&$selectionmade">
-########
+    &Apache::lonnet::appenv('cgi.'.$identifier.'.file'   => $filename,
+                            'cgi.'.$identifier.'.layout'  => $laystyle,
+                            'cgi.'.$identifier.'.numcol'  => $numberofcolumns,
+                            'cgi.'.$identifier.'.selection' => $selectionmade,
+			    'cgi.'.$identifier.'tableofcontents' => $helper->{'VARS'}->{'TABLE_CONTENTS'},
+			    'cgi.'.$identifier.'tableofindex' => $helper->{'VARS'}->{'TABLE_INDEX'},
+			    'cgi.'.$identifier.'role' => $ENV{'request.role.adv'});
  
     print $temp_file $result;