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

bowersj2 lon-capa-cvs@mail.lon-capa.org
Wed, 30 Apr 2003 19:18:37 -0000


bowersj2		Wed Apr 30 15:18:37 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  More fixing the page layout thingy.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.134 loncom/interface/lonprintout.pm:1.135
--- loncom/interface/lonprintout.pm:1.134	Wed Apr 30 15:07:29 2003
+++ loncom/interface/lonprintout.pm	Wed Apr 30 15:18:37 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.134 2003/04/30 19:07:29 bowersj2 Exp $
+# $Id: lonprintout.pm,v 1.135 2003/04/30 19:18:37 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1524,10 +1524,11 @@
 sub new { 
     my $self = Apache::lonhelper::element->new();
 
+    shift;
+
     $self->{'variable'} = shift;
     my $helper = Apache::lonhelper::getHelper();
-    my $paramHash = Apache::lonhelper::getParamHash();
-    $helper->declareVar($paramHash->{'variable'});
+    $helper->declareVar($self->{'variable'});
     bless($self);
     return $self;
 }
@@ -1583,6 +1584,16 @@
 
     $result .= "</select></td></tr></table>";
     return $result;
+}
+
+sub postprocess {
+    my $self = shift;
+
+    my $var = $self->{'variable'};
+    $helper->{VARS}->{$var} = 
+        $ENV{'form.$var.layout'} . '|' . $ENV{'form.$var.cols'} . '|' .
+        $ENV{'form.$var.paper'};
+    return 1;
 }
 
 1;