version 1.149, 2006/05/15 22:01:12
|
version 1.152, 2006/05/30 12:46:09
|
Line 183 use Apache::File;
|
Line 183 use Apache::File;
|
use Apache::lonxml; |
use Apache::lonxml; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonnet; |
use Apache::lonnet; |
|
use Apache::longroup; |
use Apache::lonselstudent; |
use Apache::lonselstudent; |
|
use lib '/home/httpd/lib/perl/'; |
|
use LONCAPA; |
|
|
# Register all the tags with the helper, so the helper can |
# Register all the tags with the helper, so the helper can |
# push and pop them |
# push and pop them |
Line 468 sub _varsInFile {
|
Line 471 sub _varsInFile {
|
my $self = shift; |
my $self = shift; |
my @vars = (); |
my @vars = (); |
for my $key (keys %{$self->{VARS}}) { |
for my $key (keys %{$self->{VARS}}) { |
push @vars, &Apache::lonnet::escape($key) . '=' . |
push @vars, &escape($key) . '=' . |
&Apache::lonnet::escape($self->{VARS}->{$key}); |
&escape($self->{VARS}->{$key}); |
} |
} |
return join ('&', @vars); |
return join ('&', @vars); |
} |
} |
Line 2848 sub start_section {
|
Line 2851 sub start_section {
|
return if ($token->[2]{'onlysections'}); |
return if ($token->[2]{'onlysections'}); |
|
|
# add in groups to the end of the list |
# add in groups to the end of the list |
my %curr_groups = &Apache::loncommon::coursegroups(); |
my %curr_groups = &Apache::longroup::coursegroups(); |
foreach my $group_name (sort(keys(%curr_groups))) { |
foreach my $group_name (sort(keys(%curr_groups))) { |
push(@{$paramHash->{CHOICES}}, [$group_name, $group_name]); |
push(@{$paramHash->{CHOICES}}, [$group_name, $group_name]); |
} |
} |
Line 2912 sub start_group {
|
Line 2915 sub start_group {
|
# Populate the CHOICES element |
# Populate the CHOICES element |
my %choices; |
my %choices; |
|
|
my %curr_groups = &Apache::loncommon::coursegroups(); |
my %curr_groups = &Apache::longroup::coursegroups(); |
foreach my $group_name (sort {lc($a) cmp lc($b)} (keys(%curr_groups))) { |
foreach my $group_name (sort {lc($a) cmp lc($b)} (keys(%curr_groups))) { |
push(@{$paramHash->{CHOICES}}, [$group_name, $group_name]); |
push(@{$paramHash->{CHOICES}}, [$group_name, $group_name]); |
} |
} |
Line 3400 sub render {
|
Line 3403 sub render {
|
if ($vars->{GRANULARITY} eq 'whole_course') { |
if ($vars->{GRANULARITY} eq 'whole_course') { |
$resourceString .= '<li>'.&mt('for <b>all resources in the course</b>').'</li>'; |
$resourceString .= '<li>'.&mt('for <b>all resources in the course</b>').'</li>'; |
if ($vars->{TARGETS} eq 'course') { |
if ($vars->{TARGETS} eq 'course') { |
$level = 11; # general course, see lonparmset.pm perldoc |
$level = 14; # general course, see lonparmset.pm perldoc |
} elsif ($vars->{TARGETS} eq 'section') { |
} elsif ($vars->{TARGETS} eq 'section') { |
|
$level = 9; |
|
} elsif ($vars->{TARGETS} eq 'group') { |
$level = 6; |
$level = 6; |
} else { |
} else { |
$level = 3; |
$level = 3; |
Line 3416 sub render {
|
Line 3421 sub render {
|
$symb = $res->symb(); |
$symb = $res->symb(); |
$resourceString .= '<li>'.&mt('for the map named [_1]',"<b>$title</b>").'</li>'; |
$resourceString .= '<li>'.&mt('for the map named [_1]',"<b>$title</b>").'</li>'; |
if ($vars->{TARGETS} eq 'course') { |
if ($vars->{TARGETS} eq 'course') { |
$level = 10; # general course, see lonparmset.pm perldoc |
$level = 13; # general course, see lonparmset.pm perldoc |
} elsif ($vars->{TARGETS} eq 'section') { |
} elsif ($vars->{TARGETS} eq 'section') { |
|
$level = 8; |
|
} elsif ($vars->{TARGETS} eq 'group') { |
$level = 5; |
$level = 5; |
} else { |
} else { |
$level = 2; |
$level = 2; |
Line 3433 sub render {
|
Line 3440 sub render {
|
my $title = $res->compTitle(); |
my $title = $res->compTitle(); |
$resourceString .= '<li>'.&mt('for the resource named [_1] part [_2]',"<b>$title</b>","<b>$part</b>").'</li>'; |
$resourceString .= '<li>'.&mt('for the resource named [_1] part [_2]',"<b>$title</b>","<b>$part</b>").'</li>'; |
if ($vars->{TARGETS} eq 'course') { |
if ($vars->{TARGETS} eq 'course') { |
$level = 7; # general course, see lonparmset.pm perldoc |
$level = 10; # general course, see lonparmset.pm perldoc |
} elsif ($vars->{TARGETS} eq 'section') { |
} elsif ($vars->{TARGETS} eq 'section') { |
|
$level = 7; |
|
} elsif ($vars->{TARGETS} eq 'group') { |
$level = 4; |
$level = 4; |
} else { |
} else { |
$level = 1; |
$level = 1; |