[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /interface lonmenu.pm
raeburn
raeburn@source.lon-capa.org
Sat, 05 Mar 2011 16:34:51 -0000
raeburn Sat Mar 5 16:34:51 2011 EDT
Modified files: (Branch: version_2_10_X)
/loncom/interface lonmenu.pm
Log:
- Backport 1.348.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.315.2.8 loncom/interface/lonmenu.pm:1.315.2.9
--- loncom/interface/lonmenu.pm:1.315.2.8 Fri Jan 7 22:21:02 2011
+++ loncom/interface/lonmenu.pm Sat Mar 5 16:34:50 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.315.2.8 2011/01/07 22:21:02 raeburn Exp $
+# $Id: lonmenu.pm,v 1.315.2.9 2011/03/05 16:34:50 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -453,12 +453,12 @@
$newmail= 'swmenu.setstatus("you have","messages");';
}
- my ($breadcrumb,$separator);
+ my ($breadcrumb,$separator,$resurl);
if ($noremote
&& ($env{'request.symb'})
&& ($env{'request.course.id'})) {
- my ($mapurl,$rid,$resurl) = &Apache::lonnet::decode_symb(&Apache::lonnet::symbread());
+ (my $mapurl, my $rid,$resurl) = &Apache::lonnet::decode_symb(&Apache::lonnet::symbread());
my $coursetitle = $env{'course.'.$env{'request.course.id'}.'.description'};
my $maptitle = &Apache::lonnet::gettitle($mapurl);
@@ -670,6 +670,18 @@
}
}
}
+ if ($env{'request.course.id'}) {
+ if ($resurl eq "public/$cdom/$cnum/syllabus") {
+ if ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ /\w/) {
+ if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
+ $editbutton=&switch('','',6,1,'pcstr.png','Edit',
+ 'resource[_2]',
+ "go('/adm/courseprefs?phase=display&actions=courseinfo')",
+ 'Edit this resource');
+ }
+ }
+ }
+ }
###
###
# Prepare the rest of the buttons