--- loncom/interface/lonprintout.pm 2003/04/30 19:18:37 1.135
+++ loncom/interface/lonprintout.pm 2003/05/01 17:19:25 1.139
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.135 2003/04/30 19:18:37 bowersj2 Exp $
+# $Id: lonprintout.pm,v 1.139 2003/05/01 17:19:25 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1437,17 +1437,22 @@ CHOOSE_STUDENTS
push @{$printChoices}, ["Problems from $subdir", 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];
my $f = '$filename';
- &Apache::lonxml::xmlparse($r, 'helper', <
Select problems you wish to print from $subdir
-
+
FINAL
- $subdir
- return $f =~
+ return '$subdir';
+CHOOSE_FROM_SUBDIR
+
+ $xmlfrag .= <<'CHOOSE_FROM_SUBDIR';
+ return $filename =~
m/^[^\.]+\.(problem|exam|quiz|assess|survey|form|library)$/;
+
CHOOSE_FROM_SUBDIR
+ &Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);
}
# Generate the first state, to select which resources get printed.
@@ -1457,6 +1462,7 @@ CHOOSE_FROM_SUBDIR
Apache::lonhelper::message->new();
$paramHash = Apache::lonhelper::getParamHash();
$paramHash->{'variable'} = 'PRINT_TYPE';
+ $helper->declareVar('PRINT_TYPE');
$paramHash->{CHOICES} = $printChoices;
Apache::lonhelper::choices->new();
Apache::lonprintout::page_format_state->new("FORMAT");
@@ -1590,9 +1596,10 @@ sub postprocess {
my $self = shift;
my $var = $self->{'variable'};
+ my $helper = Apache::lonhelper->getHelper();
$helper->{VARS}->{$var} =
- $ENV{'form.$var.layout'} . '|' . $ENV{'form.$var.cols'} . '|' .
- $ENV{'form.$var.paper'};
+ $ENV{"form.$var.layout"} . '|' . $ENV{"form.$var.cols"} . '|' .
+ $ENV{"form.$var.paper"};
return 1;
}