Diff for /loncom/publisher/lonrights.pm between versions 1.8 and 1.12

version 1.8, 2003/03/27 20:56:30 version 1.12, 2004/01/20 21:10:03
Line 36  use Apache::lonnet(); Line 36  use Apache::lonnet();
 use Apache::loncommon();  use Apache::loncommon();
 use HTML::LCParser;  use HTML::LCParser;
 use Apache::File;  use Apache::File;
   use Apache::lonlocal;
   
 sub handler {  sub handler {
   
   my $r=shift;    my $r=shift;
   $r->content_type('text/html');    &Apache::loncommon::content_type($r,'text/html');
   $r->send_http_header;    $r->send_http_header;
   
   $r->print(    $r->print(
Line 161  sub handler { Line 162  sub handler {
   my $parser=HTML::LCParser->new(\$contents);    my $parser=HTML::LCParser->new(\$contents);
   my $token;    my $token;
   my $rulecounter=0;    my $rulecounter=0;
   my $colzero=($constructmode?'Edit action':'Rule');    my $colzero=&mt($constructmode?'Edit action':'Rule');
     my %lt=&Apache::lonlocal::texthash('ef' => 'Effect',
        'do' => 'Domain',
        'co' => 'Course',
        'se' => 'Section/Group',
        'ro' => 'Role');
 # ---------------------------------------------------------- Start table output  # ---------------------------------------------------------- Start table output
   $r->print(<<ENDSTARTTABLE);    $r->print(<<ENDSTARTTABLE);
 <table border="2">  <table border="2">
     <tr><th>$colzero</th><th>Effect</th><th>Domain</th><th>Course</th>      <tr><th>$colzero</th><th>$lt{'ef'}</th><th>$lt{'do'}</th><th>$lt{'co'}</th>
 <th>Section</th><th>Role</th></tr>  <th>$lt{'se'}</th><th>$lt{'ro'}</th></tr>
 ENDSTARTTABLE  ENDSTARTTABLE
 # --------------------------------------------------------------------- Default  # --------------------------------------------------------------------- Default
 # Fast forward to first rule  # Fast forward to first rule
Line 193  ENDSTARTTABLE Line 199  ENDSTARTTABLE
   }    }
   $r->print('</td><td colspan="4">Default');    $r->print('</td><td colspan="4">Default');
   if (($token->[2]->{'realm'}) || ($token->[2]->{'role'})) {    if (($token->[2]->{'realm'}) || ($token->[2]->{'role'})) {
       $r->print(' - <font color="red">Error! No default set.</font>');        $r->print(' - <font color="red">'.&mt('Error! No default set.').
    '</font>');
   }    }
   $r->print('</td></tr>');    $r->print('</td></tr>');
 # Additional roles  # Additional roles
Line 246  ENDSTARTTABLE Line 253  ENDSTARTTABLE
               $r->print($rcourse);                $r->print($rcourse);
           }            }
   
           $r->print('</td><td rowspan="2">');            $r->print('</td><td>');
 # realm section  # realm section
           if ($constructmode) {            if ($constructmode) {
              $r->print('<input input type="text" size="5" name="section_'.               $r->print('<input input type="text" size="5" name="section_'.
Line 270  ENDSTARTTABLE Line 277  ENDSTARTTABLE
               $r->print(&Apache::lonnet::plaintext($token->[2]->{'role'}));                $r->print(&Apache::lonnet::plaintext($token->[2]->{'role'}));
           }            }
 # course selection link  # course selection link
           $r->print('</td></tr><tr><td colspan="2" align="right">');            $r->print('</td></tr><tr><td colspan="3" align="right">');
           if ($rcourse) {            if ($rcourse) {
       my %descript=        my %descript=
                  &Apache::lonnet::coursedescription($rdom.'_'.$rcourse);                   &Apache::lonnet::coursedescription($rdom.'_'.$rcourse);
               $r->print($descript{'description'}.'&nbsp;&nbsp;&nbsp;');                $r->print($descript{'description'}.'&nbsp;&nbsp;&nbsp;');
           }            }
           $r->print(&Apache::loncommon::selectcourse_link('rules',    if ($constructmode) {
     'course_'.$rulecounter,'domain_'.$rulecounter));        $r->print(&Apache::loncommon::selectcourse_link('rules',
           'course_'.$rulecounter,'domain_'.$rulecounter));
     }
 # close row  # close row
           $r->print('</td></tr>');            $r->print('</td></tr>');
      }                                              }                                       
Line 285  ENDSTARTTABLE Line 294  ENDSTARTTABLE
   $r->print('</table>');    $r->print('</table>');
 # ------------------------------------------------------------ End table output  # ------------------------------------------------------------ End table output
   if ($constructmode) {     if ($constructmode) { 
      $r->print('<input type="submit" name="store" value="Store" /></form>');        $r->print('<input type="submit" name="store" value="'.&mt('Store').'" /></form>'); 
   }    }
   $r->print('</body></html>');    $r->print('</body></html>');
   return OK;      return OK;  

Removed from v.1.8  
changed lines
  Added in v.1.12


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