--- loncom/interface/lonprintout.pm 2003/02/28 17:38:40 1.123 +++ loncom/interface/lonprintout.pm 2003/03/03 20:26:08 1.125 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.123 2003/02/28 17:38:40 albertel Exp $ +# $Id: lonprintout.pm,v 1.125 2003/03/03 20:26:08 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1205,7 +1205,7 @@ sub handler { my $r = shift; # A hook for me to work without disturbing Alex. - if (!$ENV{'form.jeremy'}) { + if ($ENV{'form.jeremy'}) { printWizard($r); return OK; } @@ -1330,11 +1330,11 @@ sub printWizard { if ($ENV{'form.postdata'}=~ /\/res\//) { # Allow problems from sequence push @{$printChoices}, ['map_problems', "Problems from $sequenceTitle", 'CHOOSE_PROBLEMS']; - Apache::lonwizard::resource_multichoice->new($wizard, "CHOOSE_PROBLEMS", 'Select Problems', "Select problems to print from $sequenceTitle:", '', 'CHOOSE_FORMAT', 'RESOURCES', sub {my $res = shift; return $res->is_problem()}, undef, $map); + Apache::lonwizard::resource_multichoice->new($wizard, "CHOOSE_PROBLEMS", 'Select Problems', "Select problems to print from $sequenceTitle:", 'CHOOSE_FORMAT', 'RESOURCES', sub {my $res = shift; return $res->is_problem()}, undef, $map); # Allow all resources from sequence push @{$printChoices}, ['map_problems_pages', "Problems and pages from $sequenceTitle", 'CHOOSE_PROBLEMS_HTML']; - Apache::lonwizard::resource_multichoice->new($wizard, "CHOOSE_PROBLEMS_HTML", 'Select Resources', "Select resources to print from $sequenceTitle:", '', "CHOOSE_FORMAT", 'RESOURCES', sub {my $res = shift; return !$res->is_map()}, undef, $map); + Apache::lonwizard::resource_multichoice->new($wizard, "CHOOSE_PROBLEMS_HTML", 'Select Resources', "Select resources to print from $sequenceTitle:", "CHOOSE_FORMAT", 'RESOURCES', sub {my $res = shift; return !$res->is_map()}, undef, $map); } # If the user is priviledged, allow them to print all @@ -1348,7 +1348,7 @@ sub printWizard { # FIXME: That RE should come from a library somewhere. if ((&Apache::lonnet::allowed('bre',$subdir) eq 'F') and ($ENV{'form.postdata'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)/)) { push @{$printChoices}, ['problems_from_directory', "Problems from $subdir", 'CHOOSE_FROM_SUBDIR']; - Apache::lonwizard::choose_files->new($wizard, "CHOOSE_FROM_SUBDIR", "Select Files","Select problems you wish to print from $subdir:", '', 'CHOOSE_FORMAT', 'FILES', $subdir, $problemFilter); + Apache::lonwizard::choose_files->new($wizard, "CHOOSE_FROM_SUBDIR", "Select Files","Select problems you wish to print from $subdir:", 'CHOOSE_FORMAT', 'FILES', $subdir, $problemFilter); } # Despite the appearance of states before here, this is the first state. @@ -1360,7 +1360,6 @@ sub printWizard { untie %hash; return OK; - }