--- loncom/publisher/lonrights.pm 2003/03/28 01:53:55 1.9 +++ loncom/publisher/lonrights.pm 2003/09/22 15:39:53 1.10 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to show and edit custom distribution rights # -# $Id: lonrights.pm,v 1.9 2003/03/28 01:53:55 www Exp $ +# $Id: lonrights.pm,v 1.10 2003/09/22 15:39:53 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,11 +36,12 @@ use Apache::lonnet(); use Apache::loncommon(); use HTML::LCParser; use Apache::File; +use Apache::lonlocal; sub handler { my $r=shift; - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; $r->print( @@ -161,12 +162,17 @@ sub handler { my $parser=HTML::LCParser->new(\$contents); my $token; my $rulecounter=0; - my $colzero=($constructmode?'Edit action':'Rule'); + my $colzero=&mt($constructmode?'Edit action':'Rule'); +my %lt=&Apache::loncommon::texthash('ef' => 'Effect', + 'do' => 'Domain', + 'co' => 'Course', + 'se' => 'Section/Group', + 'ro' => 'Role'); # ---------------------------------------------------------- Start table output $r->print(< - $colzeroEffectDomainCourse -SectionRole + $colzero$lt{'ef'}$lt{'do'}$lt{'co'} +$lt{'se'}$lt{'ro'} ENDSTARTTABLE # --------------------------------------------------------------------- Default # Fast forward to first rule @@ -193,7 +199,8 @@ ENDSTARTTABLE } $r->print('Default'); if (($token->[2]->{'realm'}) || ($token->[2]->{'role'})) { - $r->print(' - Error! No default set.'); + $r->print(' - '.&mt('Error! No default set.'). + ''); } $r->print(''); # Additional roles @@ -285,7 +292,7 @@ ENDSTARTTABLE $r->print(''); # ------------------------------------------------------------ End table output if ($constructmode) { - $r->print(''); + $r->print(''); } $r->print(''); return OK;