[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm lonrss.pm mydesk.tab

raeburn raeburn at source.lon-capa.org
Thu Dec 1 11:37:53 EST 2016


raeburn		Thu Dec  1 16:37:53 2016 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm lonrss.pm mydesk.tab 
  Log:
  - "Syllabus" and "Feeds" items in inline course menu for custom roles with
    'cev' priv.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.463 loncom/interface/lonmenu.pm:1.464
--- loncom/interface/lonmenu.pm:1.463	Tue Nov 29 03:01:04 2016
+++ loncom/interface/lonmenu.pm	Thu Dec  1 16:37:53 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.463 2016/11/29 03:01:04 raeburn Exp $
+# $Id: lonmenu.pm,v 1.464 2016/12/01 16:37:53 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -381,6 +381,7 @@
                                                ? "/$env{'request.course.sec'}"
                                                : '');
     my $canedit       = &Apache::lonnet::allowed('mdc', $env{'request.course.id'});
+    my $canvieweditor = &Apache::lonnet::allowed('cev', $env{'request.course.id'});
     my $canviewroster = $env{'course.'.$env{'request.course.id'}.'.student_classlist_view'};
     if ($canviewroster eq 'disabled') {
         undef($canviewroster);
@@ -400,7 +401,7 @@
     if ($env{'request.course.id'}) {
         $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
         $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
-        if ($canedit) {
+        if ($canedit || $canvieweditor)  {
             $showsyllabus = 1;
             $showfeeds = 1;
         } else {
@@ -416,7 +417,7 @@
                 $showfeeds = 1;
             }
         }
-        unless (($canmgr || $canvgr)) {
+        unless ($canmgr || $canvgr) {
             my %slots = &Apache::lonnet::get_course_slots($cnum,$cdom);
             if (keys(%slots) > 0) {
                 $showresv = 1;
@@ -452,8 +453,8 @@
         next if    $$menuitem[4]   ne 'always'
                 && ($$menuitem[4]   ne 'author' && $$menuitem[4] ne 'cca')
                 && !$env{'request.course.id'};
-        next if    $$menuitem[4]   =~ /^mdc/
-                && !$canedit;
+        next if    $$menuitem[4]   =~ /^crsedit/
+                && (!$canedit && !$canvieweditor);
         next if    $$menuitem[4]  eq 'nvgr'
                 && $canvgr;
         next if    $$menuitem[4]  eq 'vgr'
Index: loncom/interface/lonrss.pm
diff -u loncom/interface/lonrss.pm:1.54 loncom/interface/lonrss.pm:1.55
--- loncom/interface/lonrss.pm:1.54	Thu Jun 18 20:19:06 2015
+++ loncom/interface/lonrss.pm	Thu Dec  1 16:37:53 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # RSS Feeder
 #
-# $Id: lonrss.pm,v 1.54 2015/06/18 20:19:06 musolffc Exp $
+# $Id: lonrss.pm,v 1.55 2016/12/01 16:37:53 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -129,7 +129,7 @@
     if ($feeds) {
 	return '<h4>'.&mt('Available RSS Feeds and Blogs').'</h4><ul>'.$feeds.'</ul>';
     } else {
-        return '';
+        return '<h4>'.&mt('No available RSS Feeds and Blogs').'</h4>';
     }
 }
 
Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.172 loncom/interface/mydesk.tab:1.173
--- loncom/interface/mydesk.tab:1.172	Wed Oct 26 14:51:45 2016
+++ loncom/interface/mydesk.tab	Thu Dec  1 16:37:53 2016
@@ -63,9 +63,9 @@
 #   possible conditions:
 #   - empty: 
 #   - showgroups: user is member of a group
-#   - showsyllabus: course context and user has mdc priv, or syllabus exists
+#   - showsyllabus: course context and user has mdc or cev priv, or syllabus exists
 #                   (and not included in course content).
-#   - showfeeds: course context and user has mdc priv, or course feeds exist
+#   - showfeeds: course context and user has mdc or cev priv, or course feeds exist
 #   - showresv: course context and user cannot view or manage grades, and slots exist
 #   - always: show this link even if user hasn't selected a role
 #   - whn: access what's new
@@ -171,6 +171,8 @@
 1:1:nsc:any:roles.png:switch[_2]:role[_1]:go('/adm/roles');:Switch to another user role:rol
 1:1:nsc:rcm:roles.png:choose[_2]:role[_2]:go('/adm/roles');:Choose the user role:rol
 1:2:clear
+1:2:pcev:$crs:docs.png:course[_7]:editor[_1]:go('/adm/coursedocs?command=home');:Edit course contents:crc
+1:2:pcev:$cmty:docs.png:communi-[_1]:ty edit[_1]:go('/adm/coursedocs?command=home');:Edit community contents:cmc
 1:2:pmdc:$crs:docs.png:course[_7]:editor[_1]:go('/adm/coursedocs?command=home');:Edit course contents:crc
 1:2:pmdc:$cmty:docs.png:communi-[_1]:ty edit[_1]:go('/adm/coursedocs?command=home');:Edit community contents:cmc
 2:1:clear




More information about the LON-CAPA-cvs mailing list