version 1.309, 2004/12/12 21:17:04
|
version 1.313, 2005/01/26 22:52:25
|
Line 164 sub real_handler {
|
Line 164 sub real_handler {
|
$r->send_http_header; |
$r->send_http_header; |
|
|
my %toplinkitems=(); |
my %toplinkitems=(); |
|
&add_linkitem(\%toplinkitems,'blank','',"Select Action"); |
if ($ENV{QUERY_STRING} eq 'collapseExternal') { |
if ($ENV{QUERY_STRING} eq 'collapseExternal') { |
&Apache::lonnet::put('environment',{'remotenavmap' => 'off'}); |
&Apache::lonnet::put('environment',{'remotenavmap' => 'off'}); |
&Apache::lonnet::appenv('environment.remotenavmap' => 'off'); |
&Apache::lonnet::appenv('environment.remotenavmap' => 'off'); |
Line 217 ENDSUBM
|
Line 217 ENDSUBM
|
$r->print("<html><head>\n"); |
$r->print("<html><head>\n"); |
$r->print("<title>".&mt('Navigate Course Contents')."</title>"); |
$r->print("<title>".&mt('Navigate Course Contents')."</title>"); |
# ------------------------------------------------------------ Get query string |
# ------------------------------------------------------------ Get query string |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['register','sort','showOnlyHomework']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['register','sort','showOnlyHomework','postsymb']); |
|
|
# ----------------------------------------------------- Force menu registration |
# ----------------------------------------------------- Force menu registration |
my $addentries=''; |
my $addentries=''; |
Line 1849 END
|
Line 1849 END
|
# Add part 0 so we display it correctly. |
# Add part 0 so we display it correctly. |
unshift @parts, '0'; |
unshift @parts, '0'; |
} |
} |
|
|
|
{ |
|
my ($src,$symb,$anchor,$stack); |
|
if ($args->{'sort'}) { |
|
my $it = $navmap->getIterator(undef, undef, undef, 1); |
|
while ( my $res=$it->next()) { |
|
if (ref($res) && |
|
$res->symb() eq $curRes->symb()) { last; } |
|
} |
|
$stack=$it->getStack(); |
|
} else { |
|
$stack=$it->getStack(); |
|
} |
|
($src,$symb,$anchor)=getLinkForResource($stack); |
|
if (defined($anchor)) { $anchor='#'.$anchor; } |
|
my $srcHasQuestion = $src =~ /\?/; |
|
$args->{"resourceLink"} = $src. |
|
($srcHasQuestion?'&':'?') . |
|
'symb=' . &Apache::lonnet::escape($symb).$anchor; |
|
} |
# Now, we've decided what parts to show. Loop through them and |
# Now, we've decided what parts to show. Loop through them and |
# show them. |
# show them. |
foreach my $part (@parts) { |
foreach my $part (@parts) { |
Line 1860 END
|
Line 1879 END
|
|
|
# Set up some data about the parts that the cols might want |
# Set up some data about the parts that the cols might want |
my $filter = $it->{FILTER}; |
my $filter = $it->{FILTER}; |
my ($src,$symb,$anchor); |
|
if ($args->{'sort'}) { |
|
$src = $curRes->src(); # FIXME this is wrong for .pages |
|
$symb = $curRes->symb(); # FIXME this is wrong for .pages |
|
} else { |
|
my $stack = $it->getStack(); |
|
($src,$symb,$anchor)=getLinkForResource($stack); |
|
} |
|
if (defined($anchor)) { $anchor='#'.$anchor; } |
|
my $srcHasQuestion = $src =~ /\?/; |
|
$args->{"resourceLink"} = $src. |
|
($srcHasQuestion?'&':'?') . |
|
'symb=' . &Apache::lonnet::escape($symb).$anchor; |
|
|
|
# Now, display each column. |
# Now, display each column. |
foreach my $col (@$cols) { |
foreach my $col (@$cols) { |
Line 1950 sub add_linkitem {
|
Line 1956 sub add_linkitem {
|
|
|
sub show_linkitems { |
sub show_linkitems { |
my ($linkitems)=@_; |
my ($linkitems)=@_; |
my @linkorder = ("launchnav","closenav","firsthomework","everything", |
my @linkorder = ("blank","launchnav","closenav","firsthomework", |
"uncompleted","changefolder","clearbubbles"); |
"everything","uncompleted","changefolder","clearbubbles"); |
|
|
my $result .= (<<ENDBLOCK); |
my $result .= (<<ENDBLOCK); |
<td align="left"> |
<td align="left"> |
Line 4719 sub browsePriv {
|
Line 4725 sub browsePriv {
|
return $self->{BROWSE_PRIV}; |
return $self->{BROWSE_PRIV}; |
} |
} |
|
|
$self->{BROWSE_PRIV} = &Apache::lonnet::allowed('bre', $self->src()); |
$self->{BROWSE_PRIV} = &Apache::lonnet::allowed('bre',$self->src(), |
|
$self->symb()); |
} |
} |
|
|
=pod |
=pod |