[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
www
www@source.lon-capa.org
Tue, 07 Dec 2010 21:34:04 -0000
www Tue Dec 7 21:34:04 2010 EDT
Modified files:
/loncom/interface londocs.pm
Log:
Additional cleanup
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.443 loncom/interface/londocs.pm:1.444
--- loncom/interface/londocs.pm:1.443 Tue Dec 7 17:33:36 2010
+++ loncom/interface/londocs.pm Tue Dec 7 21:34:04 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.443 2010/12/07 17:33:36 www Exp $
+# $Id: londocs.pm,v 1.444 2010/12/07 21:34:04 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2636,33 +2636,18 @@
$r->print('<li'.(($mode eq 'navmaps')?' class="active"':'').'><a href="/adm/navmaps"><b> '.&mt('Content Overview').' </b></a></li>');
my $active = '';
-# does this user have privileges to modify docs
+# does this user have privileges to modify docs?
my $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'});
my $onclick;
my $href;
if ($allowed) {
-# if (($mode eq 'navmaps') || ($mode eq 'tools')) {
- $href="/adm/coursedocs?forcestandard=1";
- $onclick='';
-# } else {
-# $href='#';
-# $onclick=' onclick="javascript:showPage(this,\'mainCourseDocuments\',\'mainnav\',\'maincoursedoc\');"';
-# }
- $r->print('<li '.(($mode eq 'docs')?' class="active"':'').$onclick.
- '><a href="'.$href.'"><b> '.&mt('Content Editor').' </b></a></li>');
- }
-# if (($mode eq 'navmaps') || ($mode eq 'tools')) {
- $href="/adm/coursedocs?forcesupplement=1";
- $onclick='';
-# } else {
-# $href='#';
-# $onclick=' onclick="javascript:showPage(this,\'mainCourseDocuments\',\'mainnav\',\'maincoursedoc\');"';
-# }
-
- $r->print('<li '.(($mode eq 'supdocs')?' class="active"':'').$onclick.
- '><a href="'.$href.'"><b>'.&mt('Supplemental Documents').'</b></a></li>');
+ $r->print('<li '.(($mode eq 'docs')?' class="active"':'').
+ '><a href="/adm/coursedocs?forcestandard=1"><b> '.&mt('Content Editor').' </b></a></li>');
+ }
+ $r->print('<li '.(($mode eq 'supdocs')?' class="active"':'').
+ '><a href="/adm/coursedocs?forcesupplement=1"><b>'.&mt('Supplemental Documents').'</b></a></li>');
$r->print('</ul>');
$r->print('<div class="LC_Box" style="clear:both;margin:0;">'
.'<div id="maincoursedoc" style="margin:0 0;padding:0 0;">');
@@ -3043,11 +3028,12 @@
# supplementalflag=0: show standard documents
my $supplementalflag=($env{'form.folderpath'}=~/^supplemental/);
- if (($standard) && ($allowed) && (($env{'form.folderpath'}=~/^default/) || $env{'form.folderpath'} eq "" || ($env{'form.pagepath'}))) {
+ if (($standard) && (($env{'form.folderpath'}=~/^default/) || $env{'form.folderpath'} eq "" || ($env{'form.pagepath'}))) {
$supplementalflag=0;
}
if ($env{'form.forcesupplement'}) { $supplementalflag=1; }
if ($env{'form.forcestandard'}) { $supplementalflag=0; }
+ unless ($allowed) { $supplementalflag=1; }
# Generate the tabs
&startContentScreen($r,($supplementalflag?'supdocs':'docs'));