version 1.145, 2003/05/02 19:22:20
|
version 1.149, 2003/05/05 18:01:21
|
Line 1774 sub printHelper {
|
Line 1774 sub printHelper {
|
Apache::loncommon::get_unprocessed_cgi($ENV{QUERY_STRING}); |
Apache::loncommon::get_unprocessed_cgi($ENV{QUERY_STRING}); |
|
|
my $helper = Apache::lonhelper::helper->new("Printing Wizard"); |
my $helper = Apache::lonhelper::helper->new("Printing Wizard"); |
|
$helper->declareVar('symb'); |
|
$helper->declareVar('postdata'); |
|
|
# 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. |
if (defined($ENV{'form.postdata'})) { |
if ($ENV{'form.postdata'}) { |
$helper->{VARS}->{'postdata'} = $ENV{'form.postdata'}; |
$helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($ENV{'form.postdata'}); |
} |
} |
if (defined($ENV{'form.symb'})) { |
if ($ENV{'form.symb'}) { |
$helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($helper->{VARS}->{'postdata'}); |
$helper->{VARS}->{'symb'} = $ENV{'form.symb'}; |
} |
} |
if (defined($ENV{'form.url'})) { |
if ($ENV{'form.url'}) { |
$helper->{VARS}->{'url'} = $helper->{VARS}->{'postdata'}; |
$helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($helper->{VARS}->{'postdata'}); |
} |
} |
|
|
|
|
my ($resourceTitle,$sequenceTitle,$mapTitle) = &details_for_menu; |
my ($resourceTitle,$sequenceTitle,$mapTitle) = &details_for_menu; |
$helper->{VARS}->{'assignment'} = $sequenceTitle; |
$helper->{VARS}->{'assignment'} = $sequenceTitle; |
|
|
|
# Extract map |
|
my $symb = $helper->{VARS}->{'symb'}; |
|
my ($map, $id, $url) = split(/___/, $symb); |
|
$helper->{VARS}->{'postdata'} = Apache::lonnet::clutter($url); |
|
|
if (!$resourceTitle) { # if the resource doesn't have a title, use the filename |
if (!$resourceTitle) { # if the resource doesn't have a title, use the filename |
my $url = $helper->{VARS}->{'postdata'}; |
my $url = $helper->{VARS}->{'postdata'}; |
$resourceTitle = substr($url, rindex($url, '/') + 1); |
$resourceTitle = substr($url, rindex($url, '/') + 1); |
Line 1797 sub printHelper {
|
Line 1805 sub printHelper {
|
|
|
Apache::lonhelper::registerHelperTags(); |
Apache::lonhelper::registerHelperTags(); |
|
|
# Extract map |
my $subdir = &Apache::lonnet::filelocation("", $url); |
my $symb = $helper->{VARS}->{'symb'}; |
|
my ($map, $id, $url) = split(/__/, $symb); |
|
|
|
my $subdir = &Apache::lonnet::filelocation("", $helper->{VARS}->{'postdata'}); |
|
|
|
# "Delete everything after the last slash." |
# "Delete everything after the last slash." |
$subdir =~ s|/[^/]+$||; |
$subdir =~ s|/[^/]+$||; |
Line 1882 HELPERFRAGMENT
|
Line 1886 HELPERFRAGMENT
|
<state name="CHOOSE_STUDENTS" title="Choose Students"> |
<state name="CHOOSE_STUDENTS" title="Choose Students"> |
<message>Select the students you wish to print the problems for:</message> |
<message>Select the students you wish to print the problems for:</message> |
<student multichoice='1' variable="STUDENTS" nextstate="PAGESIZE" /> |
<student multichoice='1' variable="STUDENTS" nextstate="PAGESIZE" /> |
|
<resource variable="RESOURCES" multichoice="1"> |
|
<filterfunc>return $isProblem</filterfunc> |
|
<mapurl>$map</mapurl> |
|
<valuefunc>return $symb</valuefunc> |
|
</resource> |
|
<message>How should the results be printed?</message> |
|
<choices variable="EMPTY_PAGES"> |
|
<choice computer='0'>Print all problems with no blank space between them</choice> |
|
<choice computer='1'>Put each student's problems on a new page (add pagefeed after each student)</choice> <!-- ' --> |
|
<choice computer='2'>Seperate each student's problems with a full blank page</choice> <!-- ' --> |
|
<choice computer='3'>Seperate each student's problems with two full blank pages</choice> <!-- ' --> |
|
</choices> |
</state> |
</state> |
CHOOSE_STUDENTS |
CHOOSE_STUDENTS |
} |
} |