[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm mydesk.tab
raeburn
raeburn@source.lon-capa.org
Wed, 12 Aug 2009 18:38:04 -0000
raeburn Wed Aug 12 18:38:04 2009 EDT
Modified files:
/loncom/interface lonmenu.pm mydesk.tab
Log:
- Move RCRS (request course) button from 7:3 to 8:1, so it is no longer masked
by KEYS (manage keys) for Domain Coordinators.
- Display on Remote Control, but not in inline menu (for course resources).
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.278 loncom/interface/lonmenu.pm:1.279
--- loncom/interface/lonmenu.pm:1.278 Thu Aug 6 04:09:45 2009
+++ loncom/interface/lonmenu.pm Wed Aug 12 18:38:04 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.278 2009/08/06 04:09:45 raeburn Exp $
+# $Id: lonmenu.pm,v 1.279 2009/08/12 18:38:04 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -617,6 +617,13 @@
$menuitems.="&anno-[_1]&tations[_1]&annotate()&";
$menuitems.="Make notes and annotations about this resource&&1\n";
+ unless ($noremote) {
+ my $showreqcrs = &check_for_rcrs();
+ if ($showreqcrs) {
+ $menuitems.="s&8&1&rcrs.gif&request[_1]&course[_16]".
+ "&go('/adm/requestcourse')&Course requests\n";
+ }
+ }
unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme)(\?|$)/) {
if (!$env{'request.enc'}) {
$menuitems.=(<<ENDREALRES);
@@ -1272,22 +1279,13 @@
next;
}
} elsif (($prt eq 'reqcrsnsc') || ($prt eq 'reqcrsshc')) {
- next if (&Apache::lonnet::allowed('mky',$requested_domain));
if (($prt eq 'reqcrsnsc') && ($show_course)) {
next;
}
if (($prt eq 'reqcrsshc') && (!$show_course)) {
next;
}
- my $showreqcrs = 0;
- foreach my $type ('official','unofficial','community') {
- if (&Apache::lonnet::usertools_access($env{'user.name'},
- $env{'user.domain'},
- $type,undef,'requestcourses')) {
- $showreqcrs = 1;
- last;
- }
- }
+ my $showreqcrs = &check_for_rcrs();
if (!$showreqcrs) {
$output.=&clear($row,$col);
next;
@@ -1308,6 +1306,19 @@
return $output;
}
+sub check_for_rcrs {
+ my $showreqcrs = 0;
+ foreach my $type ('official','unofficial','community') {
+ if (&Apache::lonnet::usertools_access($env{'user.name'},
+ $env{'user.domain'},
+ $type,undef,'requestcourses')) {
+ $showreqcrs = 1;
+ last;
+ }
+ }
+ return $showreqcrs;
+}
+
# ======================================================================= Close
sub close {
Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.110 loncom/interface/mydesk.tab:1.111
--- loncom/interface/mydesk.tab:1.110 Thu Aug 6 04:09:45 2009
+++ loncom/interface/mydesk.tab Wed Aug 12 18:38:04 2009
@@ -111,9 +111,10 @@
7:2:adv:rcm:egrd.gif:enter[_1]:grades[_3]:go('/adm/grades');:Enter grades from check-out assessment resources:oth
7:2:pusc:$requested_domain:sctr.gif:send bub[_1]:blesheet[_1]:gocmd('/adm/grades','scantronupload');:Send bubblesheet data to a course:oth
7:3:clear
-7:3:tools:reqcrsshc:rcrs.gif:request[_1]:course[_16]:go('/adm/requestcourse');:Course requests:rcr
-7:3:tools:reqcrsnsc:rcrs.gif:request[_1]:course[_16]:go('/adm/requestcourse');:Course requests:rol
7:3:pmky:$requested_domain:keys.gif:manage[_1]:acc keys[_1]:go('/adm/managekeys');:Manage Access Keys:dom
+8:1:clear
+8:1:tools:reqcrsshc:rcrs.gif:request[_1]:course[_16]:go('/adm/requestcourse');:Course requests:rcr
+8:1:tools:reqcrsnsc:rcrs.gif:request[_1]:course[_16]:go('/adm/requestcourse');:Course requests:rol
9:2:any:any:vbkm.gif:view[_1]:bookmark[_1]:edit_bookmarks():Use or edit my bookmark collection:set
10:1:clear
10:1:any:any:anno.gif:calendar[_1]:announce[_1]:go('/adm/announcements');:Course announcements and my calendar:com