--- loncom/interface/lonnavmaps.pm 2025/02/03 03:04:24 1.570
+++ loncom/interface/lonnavmaps.pm 2025/05/26 19:55:09 1.574
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.570 2025/02/03 03:04:24 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.574 2025/05/26 19:55:09 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1573,7 +1573,7 @@ sub render {
my $curRes;
my $foundJump = 0;
my $counter = 0;
-
+
while (($curRes = $mapIterator->next()) && !$foundJump) {
if (ref($curRes)) { $counter++; }
# Speed up display after course initialization
@@ -1604,14 +1604,15 @@ sub render {
# Print key?
if ($printKey) {
my $location = &Apache::loncommon::lonhttpdurl("/adm/lonMisc");
- $result .= '
'.
- 'Key: | '.
- ' '.
+ $result .= ' | '.
- ' '.
+ ' '.
+ ' '.
&mt('New message (click to open)').
- ' |
'."\n";
+ ''.
+ ''."\n";
}
if ($printCloseAll && !$args->{'resource_no_folder_link'}) {
@@ -1709,7 +1710,13 @@ END
# Data
if ($counter) {
- $result.=&Apache::loncommon::start_data_table("LC_tableOfContent");
+ $result.=&Apache::loncommon::start_data_table("LC_tableOfContent").
+ &Apache::loncommon::start_data_table_header_row('LC_visually_hidden').
+ ''.&mt('Resource or Folder').' | '.
+ ''.&mt('Alerts').' | '.
+ ''.&mt('Status Icon').' | '.
+ ''.&mt('Date/Completion Status').' | '.
+ &Apache::loncommon::end_data_table_row()."\n";
}
my $res = "Apache::lonnavmaps::resource";
@@ -1722,7 +1729,8 @@ END
$args->{'counter'} = 0; # counts the rows
$args->{'indentLevel'} = 0;
$args->{'isNewBranch'} = 0;
- $args->{'condensed'} = 0;
+ $args->{'condensed'} = 0;
+ $args->{'deeplinknolist'} = 0;
my $location = &Apache::loncommon::lonhttpdurl("/adm/lonIcons/whitespace_21.gif");
$args->{'indentString'} = setDefault($args->{'indentString'}, "
");
@@ -1897,6 +1905,9 @@ END
# If this has been filtered out, continue on
if (!(&$filterFunc($curRes))) {
+ if (!$userCanSeeHidden && !$curRes->randomout && $curRes->deeplinkout) {
+ $args->{'deeplinknolist'} ++;
+ }
$args->{'isNewBranch'} = 0; # Don't falsely remember this
next;
}
@@ -1921,6 +1932,7 @@ END
if ($userCanSeeHidden) {
$args->{'mapHiddenDeepLink'} = 1;
} else {
+ $args->{'deeplinknolist'} ++;
next;
}
} else {
@@ -1930,6 +1942,7 @@ END
if ($userCanSeeHidden) {
$args->{'mapUnlisted'} = 1;
} else {
+ $args->{'deeplinknolist'} ++;
next;
}
}
@@ -2108,7 +2121,7 @@ END
}
}
- if ($counter) {
+ if ($counter) {
$result.=&Apache::loncommon::end_data_table();
}
@@ -2149,14 +2162,12 @@ sub show_linkitems_toolbar {
if (ref($args->{'linkitems'}) eq 'HASH') {
my $numlinks = scalar(keys(%{$args->{'linkitems'}}));
if ($numlinks > 1) {
- $result = ''.
+ $result = ' '.
&Apache::loncommon::help_open_menu('Navigation Screen','Navigation_Screen',
undef,'RAT').
- ' | '.
- ' | '.
- ''.&mt('Tools:').' | ';
+ ' '.&mt('Tools:').'
';
}
- $result .= ''."\n".
+ $result .= ' | ';
+ '';
if (($numlinks==1) && (exists($args->{'linkitems'}{'edittoplevel'}))) {
- $result .= ''.
- &mt('Content Editor').' | ';
+ $result .= '';
}
}
if ($args->{'sort_html'}) {
- $result .= ' | | | '.
- ''.$args->{'sort_html'}.' | ';
+ $result .= ' '.
+ $args->{'sort_html'}.'
';
}
}
if ($result) {
- $result = "";
+ $result = ''.$result.'
'."\n".
+ ''."\n";
}
return $result;
}
@@ -3060,7 +3073,7 @@ sub parmval_real {
}
sub recurseup_maps {
- my ($self,$mapname,$getsymb) = @_;
+ my ($self,$mapname,$getsymb,$inclusive) = @_;
my @recurseup;
if ($mapname) {
my $res = $self->getResourceByUrl($mapname);
@@ -3074,6 +3087,13 @@ sub recurseup_maps {
@recurseup = map { &Apache::lonnet::declutter($self->getByMapPc($_)->src()); } reverse(@pcs);
}
}
+ if ($inclusive) {
+ if ($getsymb) {
+ unshift(@recurseup,$res->symb());
+ } else {
+ unshift(@recurseup,$mapname);
+ }
+ }
}
}
return @recurseup;