--- loncom/interface/lonnavdisplay.pm 2012/01/02 23:10:58 1.22
+++ loncom/interface/lonnavdisplay.pm 2013/08/07 00:03:25 1.23
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavdisplay.pm,v 1.22 2012/01/02 23:10:58 www Exp $
+# $Id: lonnavdisplay.pm,v 1.23 2013/08/07 00:03:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -293,7 +293,16 @@ sub startContentScreen {
$r->print("\n".'
'."\n");
$r->print('- '.&mt('Main Content').'
'."\n");
- $r->print('- '.&mt('Supplemental Content').'
');
+ 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");