[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmenu.pm mydesk.tab

raeburn raeburn at source.lon-capa.org
Mon May 13 16:37:58 EDT 2013


raeburn		Mon May 13 20:37:58 2013 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonmenu.pm mydesk.tab 
  Log:
  - For 2.11
    - Syllabus and Feeds (always shown in course context for users with mdc priv 
      in secondary sub menu).
    - For users without mdc priv, Syllabus and Feeds retained in secondary menu
      (if shown).
    - Group secondary menu items with sub-menus together, at right side of
      secondary menu.  
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.369.2.40 loncom/interface/lonmenu.pm:1.369.2.41
--- loncom/interface/lonmenu.pm:1.369.2.40	Sun May 12 17:51:47 2013
+++ loncom/interface/lonmenu.pm	Mon May 13 20:37:58 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.369.2.40 2013/05/12 17:51:47 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.41 2013/05/13 20:37:58 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -349,10 +349,7 @@
     if ($env{'request.course.id'}) {
         $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
         $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
-        if ($canedit) {
-            $showsyllabus = 1;
-            $showfeeds = 1;
-        } else {
+        unless ($canedit) {
             unless (&Apache::lonnet::is_on_map("public/$cdom/$cnum/syllabus")) {
                 if (($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'}) ||
                     ($env{'course.'.$env{'request.course.id'}.'.uploadedsyllabus'}) ||
@@ -440,12 +437,13 @@
                         next if ($item->[2] eq 'cst' && !$canmodifyuser);
                         next if ($item->[2] eq 'mgr' && !$canmgr);
                         next if ($item->[2] eq 'vcg' && !$canviewgrps);
+                        next if ($item->[2] eq 'mdc' && !$canedit);
                         push(@scndsub,$item); 
                     }
                 }
                 if (@scndsub > 0) {
                     $menu .= &create_submenu($link,$target,$title,\@scndsub);
-                } elsif ($link) {
+                } elsif ($link ne '#') {
                     $menu .= '<li><a href="'.$link.'" target="'.$target.'">'.&mt($title).'</a></li>';
                 }
             }
@@ -492,7 +490,7 @@
     }
     $menu =~ s/\[uname\]/$$author{user}/g;
     $menu =~ s/\[udom\]/$$author{dom}/g;
-    if ($showsyllabus || $showfeeds) {
+    if ($env{'request.course.id'}) {  
         $menu =~ s/\[cnum\]/$cnum/g;
         $menu =~ s/\[cdom\]/$cdom/g;
     }
Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.149.2.13 loncom/interface/mydesk.tab:1.149.2.14
--- loncom/interface/mydesk.tab:1.149.2.13	Sat May 11 00:19:45 2013
+++ loncom/interface/mydesk.tab	Mon May 13 20:37:58 2013
@@ -56,12 +56,13 @@
 # condition: when to show link, secondary_menu will act upon this
 #   possible conditions:
 #   - empty:
-#   - showsyllabus: course context and user has mdc priv, or syllabus exists
+#   - showsyllabus: course context: not mdc and syllabus exists
 #                   (and not included in course content).
-#   - showfeeds: course context and user has mdc priv, or course feeds exist
+#   - showfeeds: course context: not mdc and course feeds exist
 #   - always: show this link even if user hasn't selected a role
 #   - mdcCourse: user can modify content in a Course
 #   - mdcCommunity: user can modify content in a Community 
+#   - mdc: user can modify content in Course/Community 
 #   - vgr: user can view grades
 #   - cst: user can grant/revoke student/member roles
 #   - opa: user can set assessment parameters
@@ -77,13 +78,14 @@
 scnd:/adm/quickgrades:::Grades:nvgr
 scnd:/adm/coursedocs?command=contents:::Course Editor:mdcCourse
 scnd:/adm/coursedocs?command=contents:::Community Editor:mdcCommunity
+scnd:/adm/whatsnew:::What's New:whn
 scnd::::Grades:vgr
 scnd::::People:cst
 scnd::::Settings:opa
 scnd:/adm/viewclasslist:::People:ncst
 scnd:/adm/coursegroups:::Groups:nvcg
 scnd:/adm/slotrequest?command=manageresv:::Reservations:nmgr
-scnd:/adm/whatsnew:::What's New:whn
+scnd::::Public:mdc
 scnd:/public/[cdom]/[cnum]/syllabus:::Syllabus:showsyllabus
 scnd:/adm/[cdom]/[cnum]/_rss.html:::Feeds:showfeeds
 scnd:/adm/roles:::Roles:
@@ -100,6 +102,7 @@
 # condition: when to show link, secondary_menu() will act based on this
 #   possible conditions:
 #   - empty: link displayed if user is authenticated
+#   - mdc: user can modify content in Course/Community
 #   - vgr: link displayed if user can view grades
 #   - opa: link displayed if user can set assessment parameters
 #   - mgr: link displayed if user can manage grades
@@ -113,6 +116,8 @@
 scndsub:Settings:/adm/slotrequest?command=showslots:Slots:mgr
 scndsub:People:/adm/createuser:Users:cst
 scndsub:People:/adm/coursegroups:Groups:vcg
+scndsub:Public:/public/[cdom]/[cnum]/syllabus:Syllabus:mdc
+scndsub:Public:/adm/[cdom]/[cnum]/_rss.html:Feeds:mdc
 
 # Categories for main menu
 # cat:column,row:title




More information about the LON-CAPA-cvs mailing list