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

sakharuk lon-capa-cvs@mail.lon-capa.org
Thu, 27 May 2004 17:30:49 -0000


sakharuk		Thu May 27 13:30:49 2004 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Bug 2812 is fixed (second part as well) for 'portrait' layout. I'll do some job for 'landscape' layout later on (needs to adjust size and have to have a paper for this).
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.303 loncom/interface/lonprintout.pm:1.304
--- loncom/interface/lonprintout.pm:1.303	Thu May 27 10:08:58 2004
+++ loncom/interface/lonprintout.pm	Thu May 27 13:30:48 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.303 2004/05/27 14:08:58 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.304 2004/05/27 17:30:48 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1967,9 +1967,12 @@
     $result .= "</select></td><td>\n";
     $result .= "<select name='${var}.paper'>\n";
 
+    my %parmhash=&Apache::lonnet::coursedescription($ENV{'request.course.id'});
+    my $DefaultPaperSize=$parmhash{'default_paper_size'};
+    if ($DefaultPaperSize eq '') {$DefaultPaperSize='letter';}
     $i = 0;
     foreach (@paperSize) {
-        if ($i == 0) {
+        if ($paperSize[$i]=~/$DefaultPaperSize/) {
             $result .= "<option selected value='$i'>" . $paperSize[$i] . "</option>\n";
         } else {
             $result .= "<option value='$i'>" . $paperSize[$i] . "</option>\n";