[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /auth lonroles.pm

raeburn raeburn at source.lon-capa.org
Mon Mar 13 16:43:13 EDT 2017


raeburn		Mon Mar 13 20:43:13 2017 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/auth	lonroles.pm 
  Log:
  - For 2.11
    - Backport 1.328
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.269.2.31 loncom/auth/lonroles.pm:1.269.2.32
--- loncom/auth/lonroles.pm:1.269.2.31	Mon Jan 30 18:55:33 2017
+++ loncom/auth/lonroles.pm	Mon Mar 13 20:43:13 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.269.2.31 2017/01/30 18:55:33 raeburn Exp $
+# $Id: lonroles.pm,v 1.269.2.32 2017/03/13 20:43:13 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1665,9 +1665,11 @@
 sub build_roletext {
     my ($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$trole,$twhere,
         $tpstart,$tpend,$nochoose,$button,$switchserver,$reinit,$switchwarning) = @_;
-    my ($roletext,$roletext_end);
-    my $is_dc=($trolecode =~ m/^dc\./);
-    my $rowspan=($is_dc) ? ''
+    my ($roletext,$roletext_end,$poss_adhoc);
+    if ($trolecode =~ m/^d(c|h|a)\./) {
+        $poss_adhoc = 1;
+    }
+    my $rowspan=($poss_adhoc) ? ''
                          : ' rowspan="2" ';
 
     unless ($nochoose) {
@@ -1728,7 +1730,7 @@
               .'<td>'.$twhere.'</td>'
               .'<td>'.$tpstart.'</td>'
               .'<td>'.$tpend.'</td>';
-    if (!$is_dc) {
+    unless ($poss_adhoc) {
         $roletext_end = '<td colspan="4">'.
                         $tremark.' '.
                         '</td>';
@@ -1759,7 +1761,7 @@
     my $numhelpdesk = 0;
     my $numadhoc = 0;
     my $num_custom_adhoc = 0;
-    if ($env{'user.adv'}) {
+    if (($env{'user.adv'}) || ($env{'user.rar'})) {
         foreach my $envkey (sort(keys(%env))) {
             if ($envkey=~/^user\.role\.(dc|dh|da)\.\/($match_domain)\/$/) {
                 my $role = $1;




More information about the LON-CAPA-cvs mailing list