[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Wed Oct 12 10:54:09 EDT 2016


raeburn		Wed Oct 12 14:54:09 2016 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - Role name shown at top left of inline menu in course context:
    - for ad hoc helpdesk role display "Helpdesk" and the name of the custom role. 
    - for other custom roles just display the role name.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1256 loncom/interface/loncommon.pm:1.1257
--- loncom/interface/loncommon.pm:1.1256	Tue Oct 11 22:58:55 2016
+++ loncom/interface/loncommon.pm	Wed Oct 12 14:54:08 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1256 2016/10/11 22:58:55 raeburn Exp $
+# $Id: loncommon.pm,v 1.1257 2016/10/12 14:54:08 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5849,6 +5849,10 @@
     if ($env{'request.course.id'}) {
         if ($env{'request.role'} !~ /^cr/) {
             $role = &Apache::lonnet::plaintext($role,&course_type());
+        } elsif ($role =~ m{^cr/($match_domain)/\1-domainconfig/(\w+)$}) {
+            $role = &mt('Helpdesk[_1]',' '.$2); 
+        } else {
+            $role = (split(/\//,$role,4))[-1]; 
         }
         if ($env{'request.course.sec'}) {
             $role .= (' 'x2).'- '.&mt('section:').' '.$env{'request.course.sec'};




More information about the LON-CAPA-cvs mailing list