version 1.191, 2003/06/19 15:46:42
|
version 1.192, 2003/06/19 20:15:30
|
Line 899 sub printHelper {
|
Line 899 sub printHelper {
|
$subdir = &Apache::lonnet::filelocation("", $url); |
$subdir = &Apache::lonnet::filelocation("", $url); |
} |
} |
|
|
|
my $userCanSeeHidden = Apache::lonnavmaps::advancedUser(); |
|
|
Apache::lonhelper::registerHelperTags(); |
Apache::lonhelper::registerHelperTags(); |
|
|
# "Delete everything after the last slash." |
# "Delete everything after the last slash." |
Line 936 sub printHelper {
|
Line 938 sub printHelper {
|
# Allow all resources from sequence |
# Allow all resources from sequence |
push @{$printChoices}, ["Everything (problem(s), page(s), html/xml file(s)) from <b>$sequenceTitle</b>", 'map_problems_pages', 'CHOOSE_PROBLEMS_HTML']; |
push @{$printChoices}, ["Everything (problem(s), page(s), html/xml file(s)) from <b>$sequenceTitle</b>", 'map_problems_pages', 'CHOOSE_PROBLEMS_HTML']; |
|
|
my $isProblem = '$res->is_problem();'; |
my $isProblem = '$res->is_problem()'; |
|
$isProblem .= ' && !$res->randomout()' if !$userCanSeeHidden; |
my $isProblemOrMap = '$res->is_problem() || $res->is_map()'; |
my $isProblemOrMap = '$res->is_problem() || $res->is_map()'; |
my $isNotMap = '!$res->is_map();'; |
my $isNotMap = '!$res->is_map()'; |
my $symb = '$res->symb();'; |
$isNotMap .= ' && !$res->randomout()' if !$userCanSeeHidden; |
|
my $symb = '$res->symb()'; |
my $helperFragment = <<HELPERFRAGMENT; |
my $helperFragment = <<HELPERFRAGMENT; |
<state name="CHOOSE_PROBLEMS" title="Select Problem(s) to print"> |
<state name="CHOOSE_PROBLEMS" title="Select Problem(s) to print"> |
<message>(mark them then click "next" button) <br /></message> |
<message>(mark them then click "next" button) <br /></message> |
<resource variable="RESOURCES" multichoice="1" toponly='1'> |
<resource variable="RESOURCES" multichoice="1" toponly='1'> |
<nextstate>PAGESIZE</nextstate> |
<nextstate>PAGESIZE</nextstate> |
<filterfunc>return $isProblem</filterfunc> |
<filterfunc>return $isProblem;</filterfunc> |
<mapurl>$map</mapurl> |
<mapurl>$map</mapurl> |
<valuefunc>return $symb</valuefunc> |
<valuefunc>return $symb;</valuefunc> |
</resource> |
</resource> |
</state> |
</state> |
|
|
Line 957 sub printHelper {
|
Line 961 sub printHelper {
|
<nextstate>PAGESIZE</nextstate> |
<nextstate>PAGESIZE</nextstate> |
<filterfunc>return $isNotMap;</filterfunc> |
<filterfunc>return $isNotMap;</filterfunc> |
<mapurl>$map</mapurl> |
<mapurl>$map</mapurl> |
<valuefunc>return $symb</valuefunc> |
<valuefunc>return $symb;</valuefunc> |
</resource> |
</resource> |
</state> |
</state> |
HELPERFRAGMENT |
HELPERFRAGMENT |
Line 971 HELPERFRAGMENT
|
Line 975 HELPERFRAGMENT
|
push @{$printChoices}, ['<b>Problems</b> in this course', 'all_problems', 'ALL_PROBLEMS']; |
push @{$printChoices}, ['<b>Problems</b> in this course', 'all_problems', 'ALL_PROBLEMS']; |
push @{$printChoices}, ["Problems from <b>$sequenceTitle</b> for selected students", 'problems_for_students', 'CHOOSE_STUDENTS']; |
push @{$printChoices}, ["Problems from <b>$sequenceTitle</b> for selected students", 'problems_for_students', 'CHOOSE_STUDENTS']; |
|
|
my $isProblem = '$res->is_problem();'; |
my $isProblem = '$res->is_problem()'; |
my $isProblemOrMap = '$res->is_problem() || $res->is_map()'; |
$isProblem .= ' && !$res->randomout()' if !$userCanSeeHidden; |
my $symb = '$res->symb();'; |
my $isProblemOrMap = '($res->is_problem() || $res->is_map())'; |
|
$isProblemOrMap .= ' && !$res->randomout()' if !$userCanSeeHidden; |
|
my $symb = '$res->symb()'; |
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS); |
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS); |
<state name="ALL_PROBLEMS" title="Select Problem(s) to print"> |
<state name="ALL_PROBLEMS" title="Select Problem(s) to print"> |
<message>(mark them then click "next" button) <br /></message> |
<message>(mark them then click "next" button) <br /></message> |
<resource variable="RESOURCES" multichoice="1" suppressEmptySequences='1'> |
<resource variable="RESOURCES" multichoice="1" suppressEmptySequences='1'> |
<nextstate>PAGESIZE</nextstate> |
<nextstate>PAGESIZE</nextstate> |
<filterfunc>return $isProblemOrMap</filterfunc> |
<filterfunc>return $isProblemOrMap;</filterfunc> |
<choicefunc>return $isProblem</choicefunc> |
<choicefunc>return $isProblem;</choicefunc> |
<valuefunc>return $symb</valuefunc> |
<valuefunc>return $symb;</valuefunc> |
</resource> |
</resource> |
</state> |
</state> |
|
|