[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm

www lon-capa-cvs@mail.lon-capa.org
Thu, 10 Mar 2005 15:32:04 -0000


www		Thu Mar 10 10:32:04 2005 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  By common request: DOCS in top menu line.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.150 loncom/interface/lonmenu.pm:1.151
--- loncom/interface/lonmenu.pm:1.150	Sat Feb 26 01:14:01 2005
+++ loncom/interface/lonmenu.pm	Thu Mar 10 10:32:03 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.150 2005/02/26 06:14:01 albertel Exp $
+# $Id: lonmenu.pm,v 1.151 2005/03/10 15:32:03 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -62,6 +62,7 @@
 				       'main' => 'Main Menu',
                                        'roles' => ($ENV{'user.adv'}?
                                                     'Roles':'Courses'),
+                                       'docs' => 'Course Documents',
                                        'exit' => 'Exit',
 				       'launch' => 'Launch Remote Control');
 }
@@ -80,6 +81,7 @@
 
     my $navmaps='';
     my $reloadlink='';
+    my $docs='';
     my $escurl=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($ENV{'request.noversionuri'}));
     my $escsymb=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($ENV{'request.symb'}));
     if ($ENV{'request.state'} eq 'construct') {
@@ -107,6 +109,11 @@
 <a href="/adm/flip?postdata=$escreload" target="_top"><font color="$font">$lt{'ret'}</font></a>
 ENDRELOAD
             }
+	    if (&Apache::lonnet::allowed('mdc',$ENV{'request.course.id'})) {
+               $docs=(<<ENDDOCS);
+<a href="/adm/coursedocs" target="_top"><font color="$font">$lt{'docs'}</font></a>
+ENDDOCS
+            }
 	}
         my $form=&serverform();
         my $utility=&utilityfunctions();
@@ -116,7 +123,7 @@
 $utility
 </script>
 <a href="/adm/menu" target="_top">$lt{'main'}</a>
-$reloadlink $navmaps
+$reloadlink $navmaps $docs
 <a href="/adm/roles" target="_top"><font color="$font">$lt{'roles'}</font></a>
 <a href="/adm/logout" target="_top"><font color="$font">$lt{'exit'}</font></a>
 <br />
@@ -161,6 +168,12 @@
 <td bgcolor="$tabbg">
 <a href="$link"><font color="$font">$lt{'nav'}</font></a></td>
 ENDNAV
+	    if (&Apache::lonnet::allowed('mdc',$ENV{'request.course.id'})) {
+		$docs=(<<ENDDOCS);
+<td bgcolor="$tabbg">
+<a href="/adm/coursedocs"><font color="$font">$lt{'docs'}</font></a></td>
+ENDDOCS
+            }
 	    if (
 		($ENV{'request.noversionuri'}=~m[^/(res|public)/] &&
 		 $ENV{'request.symb'} eq '')
@@ -199,6 +212,7 @@
 </td>
 $reloadlink
 $navmaps
+$docs
 <td bgcolor="$tabbg">
 <a href="/adm/remote?action=launch&amp;url=$escurl" target="_top">
 <font color="$font">$lt{'launch'}</font></a></td>