--- loncom/auth/lonroles.pm 2003/11/08 12:06:38 1.75 +++ loncom/auth/lonroles.pm 2003/11/08 21:51:44 1.76 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.75 2003/11/08 12:06:38 albertel Exp $ +# $Id: lonroles.pm,v 1.76 2003/11/08 21:51:44 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -519,12 +519,32 @@ ENDHEADER } } } - foreach my $type ('Construction Space','Course','Domain','System') { + my $doheaders=-1; + foreach my $type (&mt('Construction Space'),&mt('Course'), + &mt('Domain'),&mt('System')) { + my $haverole=0; foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) { if ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/) { - $r->print($roletext{$sortrole{$which}}); + $haverole=1; } } + if ($haverole) { $doheaders++; } + } + foreach my $type (&mt('Construction Space'),&mt('Course'), + &mt('Domain'),&mt('System')) { + my $output; + foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) { + if ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/) { + $output.=$roletext{$sortrole{$which}}; + } + } + if ($output) { + if ($doheaders > 0) { + $r->print("". + "$type"); + } + $r->print($output); + } } my $tremark=''; my $tfont='#003300';