--- loncom/publisher/lonrights.pm 2011/11/14 00:20:31 1.33 +++ loncom/publisher/lonrights.pm 2012/11/09 15:29:19 1.34 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to show and edit custom distribution rights # -# $Id: lonrights.pm,v 1.33 2011/11/14 00:20:31 raeburn Exp $ +# $Id: lonrights.pm,v 1.34 2012/11/09 15:29:19 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -180,7 +180,7 @@ sub handler { $contents=join('',<$fh>); $fh->close(); } - $r->print('
'); + $r->print(''); } unless ($contents=~/\ 'Course / User', 'se' => 'Section', 'ro' => 'Role'); + my %iconimg = ('allow' => ''.&mt('allow').'', + 'deny' => ''.&mt('deny').''); # ---------------------------------------------------------- Start table output $r->print(&Apache::loncommon::start_data_table(). &Apache::loncommon::start_data_table_header_row(). @@ -217,14 +221,13 @@ sub handler { $r->print(' '); } $r->print(''); + $r->print($iconimg{$token->[2]->{'effect'}}); if ($constructmode) { my %lt = &Apache::lonlocal::texthash ('allow' => 'allow', 'deny' => 'deny'); $r->print(&Apache::loncommon::select_form ($token->[2]->{'effect'},'effect_0',\%lt)); - } else { - $r->print($token->[2]->{'effect'}); } $r->print(''.&mt('Default')); if (($token->[2]->{'realm'}) || ($token->[2]->{'role'})) { @@ -242,8 +245,8 @@ sub handler { $r->print(''.$rulecounter.'. '); if ($constructmode) { my %lt = &Apache::lonlocal::texthash - ('' => '', - 'delete' => 'Delete this rule', + ('' => '', + 'delete' => 'Delete this rule', 'insertabove' => 'Insert rule above', 'insertbelow' => 'Insert rule below', 'moveup' => 'Move rule up', @@ -256,6 +259,7 @@ sub handler { $r->print(''. ''); # effect + $r->print($iconimg{$token->[2]->{'effect'}}); if ($constructmode) { my %lt = &Apache::lonlocal::texthash ('allow' => 'allow', @@ -263,8 +267,6 @@ sub handler { $r->print(&Apache::loncommon::select_form ($token->[2]->{'effect'}, 'effect_'.$rulecounter,\%lt)); - } else { - $r->print($token->[2]->{'effect'}); } # type @@ -277,7 +279,7 @@ sub handler { $r->print(&Apache::loncommon::select_form($type, 'type_'.$rulecounter,\%lt)); } else { - $r->print($type); + $r->print(&mt($type)); } # ---- realm