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

bowersj2 lon-capa-cvs@mail.lon-capa.org
Thu, 01 May 2003 17:19:25 -0000


bowersj2		Thu May  1 13:19:25 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Stupid interpolation. Couldn't get the regex to work right in an interpolated
  here document, so I switch to an uninterpolated one to get this out of my
  hair.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.138 loncom/interface/lonprintout.pm:1.139
--- loncom/interface/lonprintout.pm:1.138	Thu May  1 11:01:04 2003
+++ loncom/interface/lonprintout.pm	Thu May  1 13:19:25 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.138 2003/05/01 15:01:04 bowersj2 Exp $
+# $Id: lonprintout.pm,v 1.139 2003/05/01 17:19:25 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1437,18 +1437,22 @@
         push @{$printChoices}, ["Problems from <b>$subdir</b>", 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];
         
         my $f = '$filename';
-        &Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_FROM_SUBDIR);
+        my $xmlfrag = <<CHOOSE_FROM_SUBDIR;
   <state name="CHOOSE_FROM_SUBDIR" title="Select Files">
     <message>Select problems you wish to print from <b>$subdir</b></message>
     <files variable="FILES" multichoice='1'>
       <nextstate>FINAL</nextstate>
       <filechoice>return '$subdir';</filechoice>
-      <filefilter>return $f =~ 
-           m/^[^\\.]+\\.(problem|exam|quiz|assess|survey|form|library)$/;
+CHOOSE_FROM_SUBDIR
+        
+        $xmlfrag .= <<'CHOOSE_FROM_SUBDIR';
+      <filefilter>return $filename =~ 
+           m/^[^\.]+\.(problem|exam|quiz|assess|survey|form|library)$/;
       </filefilter>
       </files>
     </state>
 CHOOSE_FROM_SUBDIR
+        &Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);
     }
 
     # Generate the first state, to select which resources get printed.