Diff for /loncom/xml/londefdef.pm between versions 1.372 and 1.373

version 1.372, 2007/07/04 14:02:14 version 1.373, 2007/07/13 18:35:20
Line 475  sub end_meta { Line 475  sub end_meta {
 sub start_accessrule {  sub start_accessrule {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_;
     my $currentstring = '';      my $currentstring = '';
     my $eff=&Apache::lonxml::get_param      my $eff  =&Apache::lonxml::get_param('effect',$parstack,$safeeval,undef,1);
  ('effect',$parstack,$safeeval,undef,1);      my $realm=&Apache::lonxml::get_param('realm', $parstack,$safeeval,undef,1);
     my $realm=&Apache::lonxml::get_param      my $role =&Apache::lonxml::get_param('role',  $parstack,$safeeval,undef,1);
  ('realm',$parstack,$safeeval,undef,1);      my $type =&Apache::lonxml::get_param('type',  $parstack,$safeeval,undef,1);
     my $role=&Apache::lonxml::get_param  
  ('role',$parstack,$safeeval,undef,1);      my ($dom,$crs,$sec,$separator);
     my ($dom,$crs,$sec)=split(/\_/,$realm);  
     $dom = &LONCAPA::clean_domain($dom);  
     my $type=&Apache::lonxml::get_param  
  ('type',$parstack,$safeeval,undef,1);  
     if ($type eq 'user') {      if ($type eq 'user') {
    ($dom,$crs,$sec)=split(m{/},$realm);
  $crs = &LONCAPA::clean_username($crs);   $crs = &LONCAPA::clean_username($crs);
    $separator = '/';
     } else {      } else {
    ($dom,$crs,$sec)=split(/\_/,$realm);
  $crs = &LONCAPA::clean_courseid($crs);   $crs = &LONCAPA::clean_courseid($crs);
    $separator = '_';
     }      }
       $dom = &LONCAPA::clean_domain($dom);
   
     $sec =~s/\W//;      $sec =~s/\W//;
     $realm = $dom;      $realm = $dom;
     if ($crs =~ /\S/) { $realm .= '_'.$crs; }      if ($crs =~ /\S/) { $realm .= $separator.$crs; }
     if ($sec =~ /\S/) { $realm .= '_'.$sec; }      if ($sec =~ /\S/) { $realm .= $separator.$sec; }
     $role=~s/\W//g;      $role=~s/\W//g;
   
     if ($target eq 'web') {      if ($target eq 'web') {

Removed from v.1.372  
changed lines
  Added in v.1.373


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