Diff for /loncom/publisher/lonrights.pm between versions 1.17 and 1.22

version 1.17, 2005/04/07 06:56:27 version 1.22, 2007/05/02 01:34:23
Line 55  sub handler { Line 55  sub handler {
   &Apache::loncommon::content_type($r,'text/html');    &Apache::loncommon::content_type($r,'text/html');
   $r->send_http_header;    $r->send_http_header;
   
   $r->print(    my $js = &Apache::loncommon::coursebrowser_javascript();
      '<html><head><title>LON-CAPA Custom Distribution Rights</title>'.  
    &Apache::loncommon::coursebrowser_javascript().'</head>');  
   
   $r->print(&Apache::loncommon::bodytag('Custom Distribution Rights'));    $r->print(&Apache::loncommon::start_page('Custom Distribution Rights',$js));
   $r->rflush();    $r->rflush();
   
   my $uri=$r->uri;    my $uri=$r->uri;
Line 91  sub handler { Line 89  sub handler {
           ($rulehash{'effect'} eq 'allow')) {            ($rulehash{'effect'} eq 'allow')) {
       $rulehash{'effect'}='deny';        $rulehash{'effect'}='deny';
                   }                    }
                   $rulehash{'domain'}=~s/\W//g;                    $rulehash{'domain'} = &LONCAPA::clean_domain($rulehash{'domain'});
                   $rulehash{'course'}=~s/\W//g;    $rulehash{'course'} = &LONCAPA::clean_courseid($rulehash{'course'});
                   $rulehash{'section'}=~s/\W//g;                    $rulehash{'section'}=~s/\W//g;
                   unless ($rulehash{'domain'}) {                     unless ($rulehash{'domain'}) { 
                      $rulehash{'domain'}=$env{'user.domain'};                        $rulehash{'domain'}=$env{'user.domain'}; 
Line 177  sub handler { Line 175  sub handler {
   my %lt=&Apache::lonlocal::texthash('ef' => 'Effect',    my %lt=&Apache::lonlocal::texthash('ef' => 'Effect',
      'do' => 'Domain',       'do' => 'Domain',
      'co' => 'Course',       'co' => 'Course',
      'se' => 'Section/Group',       'se' => 'Section',
      'ro' => 'Role');       'ro' => 'Role');
 # ---------------------------------------------------------- Start table output  # ---------------------------------------------------------- Start table output
   $r->print(<<ENDSTARTTABLE);    $r->print(<<ENDSTARTTABLE);
Line 245  ENDSTARTTABLE Line 243  ENDSTARTTABLE
   $r->print('</td><td>');    $r->print('</td><td>');
 # ---- realm  # ---- realm
           my $realm=$token->[2]->{'realm'};            my $realm=$token->[2]->{'realm'};
           $realm=~s/^\W//;  
           my ($rdom,$rcourse,$rsec)=split(/[\/\_]/,$realm);            my ($rdom,$rcourse,$rsec)=split(/[\/\_]/,$realm);
     $rdom = &LONCAPA::clean_domain($rdom);
     $rcourse = &LONCAPA::clean_courseid($rcourse);
 # realm domain  # realm domain
           if ($constructmode) {            if ($constructmode) {
               unless ($rdom) { $rdom=$env{'user.domain'}; }                unless ($rdom) { $rdom=$env{'user.domain'}; }
Line 291  ENDSTARTTABLE Line 290  ENDSTARTTABLE
           $r->print('</td></tr><tr><td colspan="3" 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,
       {'one_time' => 1});
               $r->print($descript{'description'}.'&nbsp;&nbsp;&nbsp;');                $r->print($descript{'description'}.'&nbsp;&nbsp;&nbsp;');
           }            }
   if ($constructmode) {    if ($constructmode) {
Line 305  ENDSTARTTABLE Line 305  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="'.&mt('Store').'" /></form>');        $r->print('<input type="submit" name="store" value="'.&mt('Save').'" /></form>'); 
   }    }
   $r->print('</body></html>');    $r->print(&Apache::loncommon::end_page());
   return OK;      return OK;  
 }  }
   

Removed from v.1.17  
changed lines
  Added in v.1.22


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