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

raeburn raeburn@source.lon-capa.org
Wed, 02 Jun 2010 16:27:44 -0000


raeburn		Wed Jun  2 16:27:44 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/auth	lonroles.pm 
  Log:
  - Backport 1.251, and line missing from earlier 1.249 backport. 
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.231.4.13 loncom/auth/lonroles.pm:1.231.4.14
--- loncom/auth/lonroles.pm:1.231.4.13	Wed Jun  2 15:56:39 2010
+++ loncom/auth/lonroles.pm	Wed Jun  2 16:27:43 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.231.4.13 2010/06/02 15:56:39 raeburn Exp $
+# $Id: lonroles.pm,v 1.231.4.14 2010/06/02 16:27:43 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1124,10 +1124,12 @@
                         if (ref($roletext->{$sortrole->{$which}}) eq 'ARRAY') {
                             $output.= &Apache::loncommon::start_data_table_row().
                                       $roletext->{$sortrole->{$which}}->[0].
-                                      &Apache::loncommon::end_data_table_row().
-                                      &Apache::loncommon::continue_data_table_row().
-                                      $roletext->{$sortrole->{$which}}->[1].
                                       &Apache::loncommon::end_data_table_row();
+                            if ($roletext->{$sortrole->{$which}}->[1] ne '') {
+                                $output .= &Apache::loncommon::continue_data_table_row().
+                                           $roletext->{$sortrole->{$which}}->[1].
+                                           &Apache::loncommon::end_data_table_row();
+                            }
                         }
                         if ($sortrole->{$which} =~ m-dc\./($match_domain)/-) {
                             if (ref($dcroles) eq 'HASH') {
@@ -1573,7 +1575,7 @@
                 $env{'course.'.$tcourseid.'.description'}=$twhere;
             }
             my $trole = &Apache::lonnet::plaintext($ccrole,$ttype,$tcourseid);
-            $twhere.="<br />".&mt('Domain').":".$1;
+            $twhere.="<br />".&mt('Domain').":".$tdom;
             ($roletext,$roletext_end) = &build_roletext($trolecode,$tdom,$trest,'is',$tryagain,$advanced,'',$tbg,$trole,$twhere,'','','',1,'');
         }
     }