--- loncom/auth/lonroles.pm 2006/05/30 21:16:40 1.152
+++ loncom/auth/lonroles.pm 2006/06/22 23:22:47 1.158
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.152 2006/05/30 21:16:40 raeburn Exp $
+# $Id: lonroles.pm,v 1.158 2006/06/22 23:22:47 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -88,7 +88,7 @@ sub error_page {
&Apache::lonmenu::rawconfig().''.
'
'.
' ';
foreach my $type ('Course','Group') {
my $selectlink = &courselink($dcdom,$rowtype,$type);
- if ($type eq 'Group') {
- $ccrole = &Apache::loncommon::convert_role($ccrole,$type);
- }
+ my $ccrole = &Apache::lonnet::plaintext('cc',$type);
$output.= ''.$ccrole.''.
' '.$selectlink.''.
' from '.&mt('Domain').' '.$dcdom.' ';
@@ -1053,17 +1033,11 @@ sub set_privileges {
my $area = '/'.$dcdom.'/'.$pickedcourse;
my $role = 'cc';
my $spec = $role.'.'.$area;
- my $userroles = &Apache::lonnet::set_arearole($role,$area,'','',$dcdom,$env{'user.name'});
+ my %userroles = &Apache::lonnet::set_arearole($role,$area,'','',$dcdom,$env{'user.name'});
my %ccrole = ();
&Apache::lonnet::standard_roleprivs(\%ccrole,$role,$dcdom,$spec,$pickedcourse,$area);
- my ($author,$adv)= &Apache::lonnet::set_userprivs(\$userroles,\%ccrole);
- my @newprivs = split/\n/,$userroles;
- my %newccroles = ();
- foreach (@newprivs) {
- my ($key,$val) = split/=/,$_;
- $newccroles{$key} = $val;
- }
- &Apache::lonnet::appenv(%newccroles);
+ my ($author,$adv)= &Apache::lonnet::set_userprivs(\%userroles,\%ccrole);
+ &Apache::lonnet::appenv(%userroles);
&Apache::lonnet::log($env{'user.domain'},
$env{'user.name'},
$env{'user.home'},
|