--- loncom/interface/lonnavdisplay.pm 2012/01/02 23:10:58 1.22
+++ loncom/interface/lonnavdisplay.pm 2014/04/06 16:30:45 1.22.4.3
@@ -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.22.4.3 2014/04/06 16:30:45 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -246,7 +246,7 @@ sub real_handler {
@@ -293,9 +293,17 @@ 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");
$r->print('