version 1.159, 2003/05/08 18:41:16
|
version 1.162, 2003/05/12 18:47:07
|
Line 1582 sub handler {
|
Line 1582 sub handler {
|
$helper = $result; |
$helper = $result; |
|
|
|
|
# my $key; |
|
# foreach $key (keys %{$helper->{'VARS'}}) { |
my $key; |
# $r->print(' '.$key.'->'.$helper->{'VARS'}->{$key}.'<-<br />'); |
foreach $key (keys %{$helper->{'VARS'}}) { |
# } |
$r->print(' '.$key.'->'.$helper->{'VARS'}->{$key}.'<-<br />'); |
# return OK; |
} |
|
return OK; |
|
|
|
|
&output_data_new($r,$helper); |
&output_data_new($r,$helper); |
Line 1749 sub printHelper {
|
Line 1750 sub printHelper {
|
|
|
# "Delete everything after the last slash." |
# "Delete everything after the last slash." |
$subdir =~ s|/[^/]+$||; |
$subdir =~ s|/[^/]+$||; |
if (not defined $helper->{VARS}->{'construction'}) { |
if (not $helper->{VARS}->{'construction'}) { |
$subdir = '/home/httpd/html/res'.$subdir; |
$subdir='/home/httpd/html/res/'.$subdir; |
} else { |
|
$helper->{VARS}->{'construction'}=~/^([^\/]+)\/\/([^\/]+)(.*)\/[^\/]*$/; |
|
$subdir = $3; |
|
$subdir=~/\/~([^\/]+)\/(.*)$/; |
|
$subdir = '/home/'.$1.'/public_html/'.$2; |
|
} |
} |
#### $r->print('Dir: '.$subdir.' '); |
|
#### return OK; |
|
|
|
|
|
# What can be printed is a very dynamic decision based on |
# What can be printed is a very dynamic decision based on |
Line 1890 CHOOSE_FROM_SUBDIR
|
Line 1884 CHOOSE_FROM_SUBDIR
|
$helper->declareVar('PRINT_TYPE'); |
$helper->declareVar('PRINT_TYPE'); |
$paramHash->{CHOICES} = $printChoices; |
$paramHash->{CHOICES} = $printChoices; |
Apache::lonhelper::choices->new(); |
Apache::lonhelper::choices->new(); |
|
|
|
if ($ENV{'request.role.adv'}) { |
|
$paramHash = Apache::lonhelper::getParamHash(); |
|
$paramHash->{MESSAGE_TEXT} = "<br /><big><b><i>Next option is available only for advanced users:</i></b></big><br />"; |
|
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"); |
Apache::lonprintout::page_format_state->new("FORMAT"); |
|
|
# Generate the PAGESIZE state which will offer the user the margin |
# Generate the PAGESIZE state which will offer the user the margin |