--- loncom/interface/lonprintout.pm 2003/05/08 18:41:16 1.159
+++ loncom/interface/lonprintout.pm 2003/05/12 18:47:07 1.162
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.159 2003/05/08 18:41:16 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.162 2003/05/12 18:47:07 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1582,11 +1582,12 @@ sub handler {
$helper = $result;
-# my $key;
-# foreach $key (keys %{$helper->{'VARS'}}) {
-# $r->print(' '.$key.'->'.$helper->{'VARS'}->{$key}.'<-
');
-# }
-# return OK;
+
+ my $key;
+ foreach $key (keys %{$helper->{'VARS'}}) {
+ $r->print(' '.$key.'->'.$helper->{'VARS'}->{$key}.'<-
');
+ }
+ return OK;
&output_data_new($r,$helper);
@@ -1749,16 +1750,9 @@ sub printHelper {
# "Delete everything after the last slash."
$subdir =~ s|/[^/]+$||;
- if (not defined $helper->{VARS}->{'construction'}) {
- $subdir = '/home/httpd/html/res'.$subdir;
- } else {
- $helper->{VARS}->{'construction'}=~/^([^\/]+)\/\/([^\/]+)(.*)\/[^\/]*$/;
- $subdir = $3;
- $subdir=~/\/~([^\/]+)\/(.*)$/;
- $subdir = '/home/'.$1.'/public_html/'.$2;
+ if (not $helper->{VARS}->{'construction'}) {
+ $subdir='/home/httpd/html/res/'.$subdir;
}
-#### $r->print('Dir: '.$subdir.' ');
-#### return OK;
# What can be printed is a very dynamic decision based on
@@ -1890,6 +1884,20 @@ CHOOSE_FROM_SUBDIR
$helper->declareVar('PRINT_TYPE');
$paramHash->{CHOICES} = $printChoices;
Apache::lonhelper::choices->new();
+
+ if ($ENV{'request.role.adv'}) {
+ $paramHash = Apache::lonhelper::getParamHash();
+ $paramHash->{MESSAGE_TEXT} = "
Next option is available only for advanced users:
";
+ Apache::lonhelper::message->new();
+ $paramHash = Apache::lonhelper::getParamHash();
+ $paramHash->{'variable'} = 'ANSWER_TYPE';
+ $helper->declareVar('ANSWER_TYPE');
+ $paramHash->{CHOICES} = [
+ ['Print without answer', '1'],
+ ['Print with answers', '0'] ];
+ Apache::lonhelper::choices->new();
+ }
+
Apache::lonprintout::page_format_state->new("FORMAT");
# Generate the PAGESIZE state which will offer the user the margin