--- loncom/interface/lonprintout.pm 2003/06/19 15:04:30 1.190
+++ loncom/interface/lonprintout.pm 2003/06/19 20:15:30 1.192
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.190 2003/06/19 15:04:30 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.192 2003/06/19 20:15:30 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -899,6 +899,8 @@ sub printHelper {
$subdir = &Apache::lonnet::filelocation("", $url);
}
+ my $userCanSeeHidden = Apache::lonnavmaps::advancedUser();
+
Apache::lonhelper::registerHelperTags();
# "Delete everything after the last slash."
@@ -936,18 +938,20 @@ sub printHelper {
# Allow all resources from sequence
push @{$printChoices}, ["Everything (problem(s), page(s), html/xml file(s)) from $sequenceTitle", '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 $isNotMap = '!$res->is_map();';
- my $symb = '$res->symb();';
+ my $isNotMap = '!$res->is_map()';
+ $isNotMap .= ' && !$res->randomout()' if !$userCanSeeHidden;
+ my $symb = '$res->symb()';
my $helperFragment = <
(mark them then click "next" button)
PAGESIZE
- return $isProblem
+ return $isProblem;
$map
- return $symb
+ return $symb;
@@ -957,7 +961,7 @@ sub printHelper {
PAGESIZE
return $isNotMap;
$map
- return $symb
+ return $symb;
HELPERFRAGMENT
@@ -971,22 +975,23 @@ HELPERFRAGMENT
push @{$printChoices}, ['Problems in this course', 'all_problems', 'ALL_PROBLEMS'];
push @{$printChoices}, ["Problems from $sequenceTitle for selected students", 'problems_for_students', 'CHOOSE_STUDENTS'];
- my $isProblem = '$res->is_problem();';
- my $isProblemOrMap = '$res->is_problem() || $res->is_map()';
- my $symb = '$res->symb();';
+ my $isProblem = '$res->is_problem()';
+ $isProblem .= ' && !$res->randomout()' if !$userCanSeeHidden;
+ my $isProblemOrMap = '($res->is_problem() || $res->is_map())';
+ $isProblemOrMap .= ' && !$res->randomout()' if !$userCanSeeHidden;
+ my $symb = '$res->symb()';
&Apache::lonxml::xmlparse($r, 'helper', <
(mark them then click "next" button)
PAGESIZE
- return $isProblemOrMap
- return $isProblem
- return $symb
+ return $isProblemOrMap;
+ return $isProblem;
+ return $symb;
- (do not forget to select assignment itself - make another selection below)
Select resources for the assignment