version 1.203, 2003/07/14 14:30:35
|
version 1.208, 2003/08/02 13:57:05
|
Line 619 ENDPART
|
Line 619 ENDPART
|
$currentURL=$helper->{'VARS'}->{'filename'}; |
$currentURL=$helper->{'VARS'}->{'filename'}; |
$currentURL=~s/\/home\//\/~/; |
$currentURL=~s/\/home\//\/~/; |
$currentURL=~s/public_html\///; |
$currentURL=~s/public_html\///; |
|
if ($currentURL=~/([^?]+)/) {$currentURL=$1;} |
} |
} |
$selectionmade = 1; |
$selectionmade = 1; |
if ($currentURL=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) { |
if ($currentURL=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) { |
Line 650 ENDPART
|
Line 651 ENDPART
|
($result,$number_of_columns) = &page_cleanup($result); |
($result,$number_of_columns) = &page_cleanup($result); |
} |
} |
} else { |
} else { |
# $result='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: '; |
$result='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: '; |
# if ($ENV{'form.url'}=~/\/(aboutme|syllabus|bulletinboard|smppg)$/) { |
if ($currentURL=~/\/(aboutme|syllabus|bulletinboard|smppg)$/) { |
# $result.=$1; |
$result.=$1; |
# } else { |
} elsif ($currentURL=~/\/ext\//) { |
# $result.=$ENV{'form.url'}; |
$result.=' \strut \\\\ THIS IS EXTERNAL RESOURCE WITH URL \strut \\\\ '.$currentURL.' '; |
# } |
} else { |
# $result.=' \end{document}' |
$result.=$currentURL; |
|
} |
|
$result.=' \end{document}' |
} |
} |
} elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or |
} elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or |
($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') or |
($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') or |
Line 900 sub handler {
|
Line 903 sub handler {
|
|
|
my %parmhash=&Apache::lonnet::coursedescription($ENV{'request.course.id'}); |
my %parmhash=&Apache::lonnet::coursedescription($ENV{'request.course.id'}); |
|
|
my $key; |
# my $key; |
# foreach $key (keys %parmhash) { |
# foreach $key (keys %parmhash) { |
# $r->print(' '.$key.'->'.$parmhash{$key}.'<-<br />'); |
# $r->print(' '.$key.'->'.$parmhash{$key}.'<-<br />'); |
# } |
# } |
Line 955 sub printHelper {
|
Line 958 sub printHelper {
|
# This will persistently load in the data we want from the |
# This will persistently load in the data we want from the |
# very first screen. |
# very first screen. |
# Detect whether we're coming from construction space |
# Detect whether we're coming from construction space |
if ($ENV{'form.postdata'} =~ /http:\/\// ) { |
if ($ENV{'form.postdata'}=~/^(?:http:\/\/[^\/]+\/|\/|)\~([^\/]+)\/(.*)$/) { |
$ENV{'form.postdata'} =~ /http:\/\/[^\/]+\/~([^\/]+)\/(.*)/; |
|
$helper->{VARS}->{'filename'} = "/home/$1/public_html/$2"; |
$helper->{VARS}->{'filename'} = "/home/$1/public_html/$2"; |
$helper->{VARS}->{'construction'} = 1; |
$helper->{VARS}->{'construction'} = 1; |
} else { |
} else { |
Line 1107 HELPERFRAGMENT
|
Line 1109 HELPERFRAGMENT
|
</resource> |
</resource> |
<message><br /><big><i><b>How should the results be printed?</b></i></big><br /></message> |
<message><br /><big><i><b>How should the results be printed?</b></i></big><br /></message> |
<choices variable="EMPTY_PAGES"> |
<choices variable="EMPTY_PAGES"> |
<choice computer='0'>Start each student\'s assignment on a new page (add a pagefeed after each assignment)</choice> |
<choice computer='0'>Start each student\'s assignment on a new page/column (add a pagefeed after each assignment)</choice> |
<choice computer='1'>Add one empty page after each student\'s assignment</choice> |
<choice computer='1'>Add one empty page/column after each student\'s assignment</choice> |
<choice computer='2'>Add two empty pages after each student\'s assignment</choice> |
<choice computer='2'>Add two empty pages/column after each student\'s assignment</choice> |
|
<choice computer='3'>Add three empty pages/column after each student\'s assignment</choice> |
</choices> |
</choices> |
</state> |
</state> |
CHOOSE_STUDENTS |
CHOOSE_STUDENTS |
Line 1130 CHOOSE_FROM_SUBDIR
|
Line 1133 CHOOSE_FROM_SUBDIR
|
|
|
$xmlfrag .= <<'CHOOSE_FROM_SUBDIR'; |
$xmlfrag .= <<'CHOOSE_FROM_SUBDIR'; |
<filefilter>return $filename =~ |
<filefilter>return $filename =~ |
m/^[^\.]+\.(problem|exam|quiz|assess|survey|form|library)$/; |
m/\.(problem|exam|quiz|assess|survey|form|library)$/; |
</filefilter> |
</filefilter> |
</files> |
</files> |
</state> |
</state> |