--- loncom/interface/lonnavdisplay.pm 2011/12/28 04:11:05 1.21
+++ loncom/interface/lonnavdisplay.pm 2013/08/08 01:54:51 1.22.4.2
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavdisplay.pm,v 1.21 2011/12/28 04:11:05 raeburn Exp $
+# $Id: lonnavdisplay.pm,v 1.22.4.2 2013/08/08 01:54:51 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -292,10 +292,18 @@ sub startContentScreen {
my ($r,$mode)=@_;
$r->print("\n".'
'."\n");
- $r->print('- '.&mt('Main Content').'
'."\n");
- $r->print('- '.&mt('Supplemental Content').'
');
+ $r->print('- '.&mt('Main Content').'
'."\n");
+ my $allowed = &Apache::lonnet::allowed('mdc',$env{'request.course.id'});
+ my ($suppcount,$errors);
+ unless ($allowed) {
+ my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
+ my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
+ ($suppcount,$errors) = &Apache::lonnet::get_numsuppfiles($cnum,$cdom);
+ }
+ if ($allowed || $suppcount) {
+ $r->print('- '.&mt('Supplemental Content').'
');
+ }
$r->print('- '.&mt('Content Search').'
'."\n");
- $r->print('- '.&mt('Content Index').'
'."\n");
$r->print("\n".'
'."\n");
$r->print('