Diff for /loncom/publisher/lonrights.pm between versions 1.33 and 1.34

version 1.33, 2011/11/14 00:20:31 version 1.34, 2012/11/09 15:29:19
Line 180  sub handler { Line 180  sub handler {
           $contents=join('',<$fh>);            $contents=join('',<$fh>);
           $fh->close();            $fh->close();
       }        }
       $r->print('<form name="rules" method="post">');        $r->print('<form name="rules" method="post" action="">');
   }    }
   unless ($contents=~/\<accessrule/s) {    unless ($contents=~/\<accessrule/s) {
       $contents='<accessrule effect="deny" />';        $contents='<accessrule effect="deny" />';
Line 196  sub handler { Line 196  sub handler {
      'co' => 'Course / User',       'co' => 'Course / User',
      'se' => 'Section',       'se' => 'Section',
      'ro' => 'Role');       'ro' => 'Role');
     my %iconimg = ('allow' => '<img src="/adm/lonIcons/navmap.correct.gif"'
                              .' alt="'.&mt('allow').'" title="'.&mt('allow').'" />',
                    'deny' => '<img src="/adm/lonIcons/navmap.wrong.gif"'
                              .' alt="'.&mt('deny').'" title="'.&mt('deny').'" />');
 # ---------------------------------------------------------- Start table output  # ---------------------------------------------------------- Start table output
   $r->print(&Apache::loncommon::start_data_table().    $r->print(&Apache::loncommon::start_data_table().
     &Apache::loncommon::start_data_table_header_row().      &Apache::loncommon::start_data_table_header_row().
Line 217  sub handler { Line 221  sub handler {
       $r->print('&nbsp;');        $r->print('&nbsp;');
   }    }
   $r->print('</td><td>');    $r->print('</td><td>');
     $r->print($iconimg{$token->[2]->{'effect'}});
   if ($constructmode) {    if ($constructmode) {
       my %lt = &Apache::lonlocal::texthash        my %lt = &Apache::lonlocal::texthash
                                    ('allow' => 'allow',                                     ('allow' => 'allow',
                                     'deny'  => 'deny');                                      'deny'  => 'deny');
       $r->print(&Apache::loncommon::select_form        $r->print(&Apache::loncommon::select_form
                                  ($token->[2]->{'effect'},'effect_0',\%lt));                                   ($token->[2]->{'effect'},'effect_0',\%lt));
   } else {  
       $r->print($token->[2]->{'effect'});  
   }    }
   $r->print('</td><td colspan="5">'.&mt('Default'));    $r->print('</td><td colspan="5">'.&mt('Default'));
   if (($token->[2]->{'realm'}) || ($token->[2]->{'role'})) {    if (($token->[2]->{'realm'}) || ($token->[2]->{'role'})) {
Line 242  sub handler { Line 245  sub handler {
   $r->print('<span class="LC_nobreak">'.$rulecounter.'. ');    $r->print('<span class="LC_nobreak">'.$rulecounter.'. ');
           if ($constructmode) {            if ($constructmode) {
              my %lt = &Apache::lonlocal::texthash               my %lt = &Apache::lonlocal::texthash
                           ('' => '',                            (''            => '',
                            'delete' => 'Delete this rule',                             'delete'      => 'Delete this rule',
                            'insertabove' => 'Insert rule above',                             'insertabove' => 'Insert rule above',
                            'insertbelow' => 'Insert rule below',                             'insertbelow' => 'Insert rule below',
                            'moveup'      => 'Move rule up',                             'moveup'      => 'Move rule up',
Line 256  sub handler { Line 259  sub handler {
           $r->print('</span></td>'.            $r->print('</span></td>'.
     '<td rowspan="2">');      '<td rowspan="2">');
 # effect  # effect
             $r->print($iconimg{$token->[2]->{'effect'}});
           if ($constructmode) {            if ($constructmode) {
              my %lt = &Apache::lonlocal::texthash               my %lt = &Apache::lonlocal::texthash
                              ('allow' => 'allow',                               ('allow' => 'allow',
Line 263  sub handler { Line 267  sub handler {
              $r->print(&Apache::loncommon::select_form               $r->print(&Apache::loncommon::select_form
                                  ($token->[2]->{'effect'},                                   ($token->[2]->{'effect'},
                                   'effect_'.$rulecounter,\%lt));                                    'effect_'.$rulecounter,\%lt));
           } else {  
              $r->print($token->[2]->{'effect'});  
           }            }
   
 # type  # type
Line 277  sub handler { Line 279  sub handler {
               $r->print(&Apache::loncommon::select_form($type,                $r->print(&Apache::loncommon::select_form($type,
  'type_'.$rulecounter,\%lt));   'type_'.$rulecounter,\%lt));
           } else {            } else {
               $r->print($type);                $r->print(&mt($type));
           }            }
   
 # ---- realm  # ---- realm

Removed from v.1.33  
changed lines
  Added in v.1.34


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>