--- loncom/publisher/lonrights.pm 2006/04/26 14:53:48 1.19 +++ loncom/publisher/lonrights.pm 2006/12/20 22:41:08 1.21 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to show and edit custom distribution rights # -# $Id: lonrights.pm,v 1.19 2006/04/26 14:53:48 albertel Exp $ +# $Id: lonrights.pm,v 1.21 2006/12/20 22:41:08 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -89,8 +89,8 @@ sub handler { ($rulehash{'effect'} eq 'allow')) { $rulehash{'effect'}='deny'; } - $rulehash{'domain'}=~s/\W//g; - $rulehash{'course'}=~s/\W//g; + $rulehash{'domain'} = &LONCAPA::clean_domain($rulehash{'domain'}); + $rulehash{'course'} = &LONCAPA::clean_courseid($rulehash{'course'}); $rulehash{'section'}=~s/\W//g; unless ($rulehash{'domain'}) { $rulehash{'domain'}=$env{'user.domain'}; @@ -175,7 +175,7 @@ sub handler { my %lt=&Apache::lonlocal::texthash('ef' => 'Effect', 'do' => 'Domain', 'co' => 'Course', - 'se' => 'Section/Group', + 'se' => 'Section', 'ro' => 'Role'); # ---------------------------------------------------------- Start table output $r->print(<print(''); # ---- realm my $realm=$token->[2]->{'realm'}; - $realm=~s/^\W//; my ($rdom,$rcourse,$rsec)=split(/[\/\_]/,$realm); + $rdom = &LONCAPA::clean_domain($rdom); + $rcourse = &LONCAPA::clean_courseid($rcourse); # realm domain if ($constructmode) { unless ($rdom) { $rdom=$env{'user.domain'}; }