[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm mydesk.tab
raeburn
raeburn@source.lon-capa.org
Mon, 08 Dec 2008 23:07:04 -0000
raeburn Mon Dec 8 23:07:04 2008 EDT
Modified files:
/loncom/interface lonmenu.pm mydesk.tab
Log:
- Bug 5839. DCs can set availability of User Tools.
- Don't show Portfolio and Blog links in Main Menu if these User Tools are unavailable to the user.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.247 loncom/interface/lonmenu.pm:1.248
--- loncom/interface/lonmenu.pm:1.247 Thu Dec 4 13:41:37 2008
+++ loncom/interface/lonmenu.pm Mon Dec 8 23:07:03 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.247 2008/12/04 13:41:37 harmsja Exp $
+# $Id: lonmenu.pm,v 1.248 2008/12/08 23:07:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1105,7 +1105,6 @@
}
foreach my $item (sort(keys(%active))) {
$output.=$inlineremote[$item];
- &Apache::lonnet::logthis("item=$item output=$inlineremote[$item]");
}
$output.='</table>';
$output.='</div>';
@@ -1225,6 +1224,18 @@
}
}
}
+ } elsif ($pro eq 'tools') {
+ my @tools = ('aboutme','blog','portfolio');
+ if (grep(/^\Q$prt\E$/,@tools)) {
+ if (defined($env{'environment.tools.'.$prt}) &&
+ ($env{'environment.tools.'.$prt} == 0)) {
+ $output.=&clear($row,$col);
+ next;
+ }
+ }
+ $prt='any';
+ $output.=&secondlevel(
+ $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
}
}
unless (($env{'browser.interface'} eq 'textual') ||
Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.94 loncom/interface/mydesk.tab:1.95
--- loncom/interface/mydesk.tab:1.94 Wed Jul 2 20:55:19 2008
+++ loncom/interface/mydesk.tab Mon Dec 8 23:07:03 2008
@@ -38,6 +38,7 @@
# course_p??? allowed if in course and have permissions
# courseenv_???? allowed if in course and course environment key exists
# author allowed if an author
+# tools allowed if user has access to particular user tool (= prt)
#
1:1:shc:any:courses.gif:choose[_1]:course[_1]:go('/adm/roles');:Choose the course to work on:rcr
1:1:shc:rst:courses.gif:switch[_1]:course[_2]:go('/adm/roles');:Switch to another course:rcr
@@ -98,8 +99,8 @@
11:1:course:any:grps.gif:course[_14]:groups[_1]:go('/adm/coursegroups');:Enter my groups in the course:set
11:1:course_vcg:any:grps.gif:course[_14]:groups[_1]:go('/adm/coursegroups');:Enter any group in the course:cmn
11:1:course_mdg:any:grps.gif:course[_14]:groups[_1]:go('/adm/coursegroups');:Edit any group in the course:cmn
-11:2:any:any:port.gif:port-[_1]:folio[_1]:go('/adm/portfolio');:Enter my portfolio space:set
-11:3:any:any:blog.gif:edit[_1]:blogs[_1]:go('/adm/$udom/$uname/_rss.html');:Edit blogs, RSS feeds, and podcasts:set
+11:2:tools:portfolio:port.gif:port-[_1]:folio[_1]:go('/adm/portfolio');:Enter my portfolio space:set
+11:3:tools:blog:blog.gif:edit[_1]:blogs[_1]:go('/adm/$udom/$uname/_rss.html');:Edit blogs, RSS feeds, and podcasts:set
12:1:clear
12:1:any:any:src.gif:search[_3]:prtfolio[_1]:go('/adm/searchcat');:Search the database of accessible portfolio files:cnt
12:1:course:any:src.gif:search[_1]:course[_11]:go('/adm/searchcat');:Search the contents of this course or accessible portfolio files:cnt