[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
raeburn
raeburn@source.lon-capa.org
Fri, 16 Oct 2009 18:50:19 -0000
raeburn Fri Oct 16 18:50:19 2009 EDT
Modified files:
/loncom/interface londocs.pm
Log:
- Bug 6079.
- Help on editing course only displayed if user has Edit privs.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.391 loncom/interface/londocs.pm:1.392
--- loncom/interface/londocs.pm:1.391 Fri Oct 16 00:38:10 2009
+++ loncom/interface/londocs.pm Fri Oct 16 18:50:18 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.391 2009/10/16 00:38:10 raeburn Exp $
+# $Id: londocs.pm,v 1.392 2009/10/16 18:50:18 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2747,16 +2747,25 @@
# Breadcrumbs
&Apache::lonhtmlcommon::clear_breadcrumbs();
- &Apache::lonhtmlcommon::add_breadcrumb({
- href=>"/adm/createuser",text=>"$type Editor"});
+ if ($allowed) {
+ &Apache::lonhtmlcommon::add_breadcrumb({
+ href=>"/adm/coursedocs",text=>"$type Editor"});
- $r->print(&Apache::loncommon::start_page("$type Editor", $script,
- {'force_register' => $showdoc,})
- .&Apache::loncommon::help_open_menu('','',273,'RAT')
- .&Apache::lonhtmlcommon::breadcrumbs(
- 'Editing the Table of Contents for your '.$type,
- 'Docs_Adding_Course_Doc')
- );
+ $r->print(&Apache::loncommon::start_page("$type Editor", $script,
+ {'force_register' => $showdoc,})
+ .&Apache::loncommon::help_open_menu('','',273,'RAT')
+ .&Apache::lonhtmlcommon::breadcrumbs(
+ 'Editing the Table of Contents for your '.$type,
+ 'Docs_Adding_Course_Doc')
+ );
+ } else {
+ my $lc_type = lc($type);
+ &Apache::lonhtmlcommon::add_breadcrumb({
+ href=>"/adm/coursedocs",text=>"Supplemental $lc_type documents"});
+
+ $r->print(&Apache::loncommon::start_page("Supplemental documents").
+ &Apache::lonhtmlcommon::breadcrumbs());
+ }
my %allfiles = ();
my %codebase = ();