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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 30 Jun 2006 21:26:53 -0000


albertel		Fri Jun 30 17:26:53 2006 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  - removing the unloved page size selector from 2 column mode again
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.450 loncom/interface/lonprintout.pm:1.451
--- loncom/interface/lonprintout.pm:1.450	Fri Jun 30 00:23:29 2006
+++ loncom/interface/lonprintout.pm	Fri Jun 30 17:26:53 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.450 2006/06/30 04:23:29 raeburn Exp $
+# $Id: lonprintout.pm,v 1.451 2006/06/30 21:26:53 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1673,12 +1673,12 @@
 			       $selectionmade, 
 			       $helper->{'VARS'}->{'ANSWER_TYPE'});
     }
-
-    $result =~ s/\\textwidth\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\textwidth= $helper->{'VARS'}->{'pagesize.width'} $helper->{'VARS'}->{'pagesize.widthunit'} /;
-    $result =~ s/\\textheight\s*=?\s*-?\d*\.?\d*\s*(cm|mm|in)/\\textheight $helper->{'VARS'}->{'pagesize.height'} $helper->{'VARS'}->{'pagesize.heightunit'} /;
-    $result =~ s/\\evensidemargin\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\evensidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
-    $result =~ s/\\oddsidemargin\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\oddsidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
-
+    if ($numberofcolumns == 1) {
+	$result =~ s/\\textwidth\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\textwidth= $helper->{'VARS'}->{'pagesize.width'} $helper->{'VARS'}->{'pagesize.widthunit'} /;
+	$result =~ s/\\textheight\s*=?\s*-?\d*\.?\d*\s*(cm|mm|in)/\\textheight $helper->{'VARS'}->{'pagesize.height'} $helper->{'VARS'}->{'pagesize.heightunit'} /;
+	$result =~ s/\\evensidemargin\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\evensidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
+	$result =~ s/\\oddsidemargin\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\oddsidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
+    }
 
 #-- writing .tex file in prtspool 
     my $temp_file;
@@ -2952,9 +2952,9 @@
     my $helper = Apache::lonhelper::getHelper();
 
     my $format = $helper->{VARS}->{$self->{'formatvar'}};
-#    if (substr($format, 2, 1) ne '1') {
-#        $helper->changeState($self->{NEXTSTATE});
-#    }
+    if (substr($format, 2, 1) ne '1') {
+        $helper->changeState($self->{NEXTSTATE});
+    }
    
     return 1;
 }