version 1.238, 2003/09/25 18:16:04
|
version 1.240, 2003/09/25 20:43:31
|
Line 655 ENDPART
|
Line 655 ENDPART
|
$currentURL=$helper->{'VARS'}->{'postdata'}; |
$currentURL=$helper->{'VARS'}->{'postdata'}; |
} else { |
} else { |
#prints resource from the construction space |
#prints resource from the construction space |
$currentURL=$helper->{'VARS'}->{'filename'}; |
$currentURL='/'.$helper->{'VARS'}->{'filename'}; |
$currentURL=~s/\/home\//\/~/; |
|
$currentURL=~s/public_html\///; |
|
if ($currentURL=~/([^?]+)/) {$currentURL=$1;} |
if ($currentURL=~/([^?]+)/) {$currentURL=$1;} |
} |
} |
$selectionmade = 1; |
$selectionmade = 1; |
Line 1148 sub printHelper {
|
Line 1146 sub printHelper {
|
# "Remove all duplicate slashes." |
# "Remove all duplicate slashes." |
$subdir =~ s|/+|/|g; |
$subdir =~ s|/+|/|g; |
|
|
# If it's a ~ directory, convert back to /home/user/public_html |
|
$subdir =~ s/^~(\w+)\//\/home\/$1\/public_html\//; |
|
|
|
# What can be printed is a very dynamic decision based on |
# What can be printed is a very dynamic decision based on |
# lots of factors. So we need to dynamically build this list. |
# lots of factors. So we need to dynamically build this list. |
# To prevent security leaks, states are only added to the wizard |
# To prevent security leaks, states are only added to the wizard |
Line 1165 sub printHelper {
|
Line 1160 sub printHelper {
|
my $printChoices = []; |
my $printChoices = []; |
my $paramHash; |
my $paramHash; |
|
|
if ($resourceTitle && $helper->{VARS}->{'postdata'}) { |
if ($resourceTitle) { |
push @{$printChoices}, ["<b>$resourceTitle</b> (what you just saw on the screen)", 'current_document', 'PAGESIZE']; |
push @{$printChoices}, ["<b>$resourceTitle</b> (what you just saw on the screen)", 'current_document', 'PAGESIZE']; |
} |
} |
|
|
Line 1286 CHOOSE_FROM_SUBDIR
|
Line 1281 CHOOSE_FROM_SUBDIR
|
|
|
# Allow the user to select any sequence in the course, feed it to |
# Allow the user to select any sequence in the course, feed it to |
# another resource selector for that sequence |
# another resource selector for that sequence |
push @$printChoices, ["Resources from <b>selected sequence</b> in course", |
if (!$helper->{VARS}->{'construction'}) { |
'map_problems_pages', 'CHOOSE_SEQUENCE']; |
push @$printChoices, ["Resources from <b>selected sequence</b> in course", |
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_FROM_ANY_SEQUENCE); |
'map_problems_pages', 'CHOOSE_SEQUENCE']; |
|
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_FROM_ANY_SEQUENCE); |
<state name="CHOOSE_SEQUENCE" title="Select Sequence To Print From"> |
<state name="CHOOSE_SEQUENCE" title="Select Sequence To Print From"> |
<message>Select the sequence to print resources from:</message> |
<message>Select the sequence to print resources from:</message> |
<resource variable="SEQUENCE"> |
<resource variable="SEQUENCE"> |
Line 1307 CHOOSE_FROM_SUBDIR
|
Line 1303 CHOOSE_FROM_SUBDIR
|
</resource> |
</resource> |
</state> |
</state> |
CHOOSE_FROM_ANY_SEQUENCE |
CHOOSE_FROM_ANY_SEQUENCE |
|
} |
|
|
# Generate the first state, to select which resources get printed. |
# Generate the first state, to select which resources get printed. |
Apache::lonhelper::state->new("START", "Select Printing Options:"); |
Apache::lonhelper::state->new("START", "Select Printing Options:"); |