--- loncom/interface/lonnavdisplay.pm 2025/05/26 19:55:09 1.47
+++ loncom/interface/lonnavdisplay.pm 2025/05/27 23:35:38 1.48
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Display Handler
#
-# $Id: lonnavdisplay.pm,v 1.47 2025/05/26 19:55:09 raeburn Exp $
+# $Id: lonnavdisplay.pm,v 1.48 2025/05/27 23:35:38 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -373,29 +373,60 @@ ENDCLOSE
push(@names,&LONCAPA::unescape($name));
}
}
+ my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
+ my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
+ my $has_supp = &Apache::lonnet::has_unhidden_suppfiles($cnum,$cdom);
if ($linkprot) {
if ($currmatch) {
- $noresmsg = &mt('No main content available when accessed using the link you followed from [_1].',
- $currmatch);
- if ($othermatches) {
- $noresmsg = '
'.
- &mt('Main content may be available by following a different link from [_1].',
+ if ($has_supp) {
+ $noresmsg = &mt('No main content available when accessed using the link you followed from [_1].',
+ $currmatch);
+ } else {
+ $noresmsg = &mt('No content available when accessed using the link you followed from [_1].',
$currmatch);
}
+ if ($othermatches) {
+ $noresmsg = '
';
+ if ($has_supp) {
+ $noresmsg .= &mt('Main content may be available by following a different link from [_1].',
+ $currmatch);
+ } else {
+ $noresmsg .= &mt('Content may be available by following a different link from [_1].',
+ $currmatch);
+ }
+ }
} else {
- $noresmsg = &mt('No main content available using the link you followed.');
+ if ($has_supp) {
+ $noresmsg = &mt('No main content available using the link you followed.');
+ } else {
+ $noresmsg = &mt('No content available using the link you followed.');
+ }
}
} elsif (@names > 0) {
- $noresmsg = &mt('No main content available from direct login to this course.');
+ if ($has_supp) {
+ $noresmsg = &mt('No main content available from direct login to this course.');
+ } else {
+ $noresmsg = &mt('No content available from direct login to this course.');
+ }
}
if (@names == 1) {
- $noresmsg .= '
'.
- &mt('Main content is likely available by following links from [_1]',
- $names[0]);
+ $noresmsg .= '
';
+ if ($has_supp) {
+ $noresmsg .= &mt('Main content is likely available by following links from [_1]',
+ $names[0]);
+ } else {
+ $noresmsg .= &mt('Content is likely available by following links from [_1]',
+ $names[0]);
+ }
} elsif (@names > 1) {
- $noresmsg .= '
'.
- &mt('Main content is likely available by following links from the following: [_1]',
- join(', ',@names));
+ $noresmsg .= '
';
+ if ($has_supp) {
+ $noresmsg .= &mt('Main content is likely available by following links from the following: [_1]',
+ join(', ',@names));
+ } else {
+ $noresmsg .= &mt('Content is likely available by following links from the following: [_1]',
+ join(', ',@names));
+ }
}
}
}