--- loncom/publisher/lonrights.pm 2003/03/21 14:13:30 1.7 +++ loncom/publisher/lonrights.pm 2003/03/27 20:56:30 1.8 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to show and edit custom distribution rights # -# $Id: lonrights.pm,v 1.7 2003/03/21 14:13:30 www Exp $ +# $Id: lonrights.pm,v 1.8 2003/03/27 20:56:30 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -44,7 +44,8 @@ sub handler { $r->send_http_header; $r->print( - 'LON-CAPA Custom Distribution Rights'); + 'LON-CAPA Custom Distribution Rights'. + &Apache::loncommon::coursebrowser_javascript().''); $r->print(&Apache::loncommon::bodytag('Custom Distribution Rights')); $r->rflush(); @@ -152,7 +153,7 @@ sub handler { $contents=join('',<$fh>); $fh->close(); } - $r->print('
'); + $r->print(''); } unless ($contents=~/\get_token) { if (($token->[0] eq 'S') && ($token->[1] eq 'accessrule')) { $rulecounter++; - $r->print(''); + $r->print(''); # insert, delete, etc $r->print($rulecounter.'. '); if ($constructmode) { @@ -212,7 +213,7 @@ ENDSTARTTABLE 'moveup' => 'Move rule up', 'movedown' => 'Move rule down'))); } - $r->print(''); + $r->print(''); # effect if ($constructmode) { $r->print(&Apache::loncommon::select_form @@ -245,7 +246,7 @@ ENDSTARTTABLE $r->print($rcourse); } - $r->print(''); + $r->print(''); # realm section if ($constructmode) { $r->print(''); # role if ($constructmode) { my %hash=('' => ''); @@ -268,6 +269,15 @@ ENDSTARTTABLE } else { $r->print(&Apache::lonnet::plaintext($token->[2]->{'role'})); } +# course selection link + $r->print(''); + if ($rcourse) { + my %descript= + &Apache::lonnet::coursedescription($rdom.'_'.$rcourse); + $r->print($descript{'description'}.'   '); + } + $r->print(&Apache::loncommon::selectcourse_link('rules', + 'course_'.$rulecounter,'domain_'.$rulecounter)); # close row $r->print(''); }