Diff for /rat/lonuserstate.pm between versions 1.99.2.1 and 1.100

version 1.99.2.1, 2006/02/23 08:38:54 version 1.100, 2006/02/10 22:33:42
Line 318  sub loadmap { Line 318  sub loadmap {
   
 sub simplify {  sub simplify {
     my $expression=shift;      my $expression=shift;
 # (0&1) = 1  
     $expression=~s/\(0\&(\d+)\)/$1/g;  
 # (8)=8  # (8)=8
     $expression=~s/\((\d+)\)/$1/g;      $expression=~s/\((\d+)\)/$1/g;
 # 8&8=8  # 8&8=8
Line 329  sub simplify { Line 327  sub simplify {
 # (5&3)&4=5&3&4  # (5&3)&4=5&3&4
     $expression=~s/\((\d+)((?:\&\d+)+)\)\&(\d+\D)/$1$2\&$3/g;      $expression=~s/\((\d+)((?:\&\d+)+)\)\&(\d+\D)/$1$2\&$3/g;
 # (((5&3)|(4&6)))=((5&3)|(4&6))  # (((5&3)|(4&6)))=((5&3)|(4&6))
 #    $expression=~      $expression=~
 # s/\((\(\(\d+(?:\&\d+)*\)(?:\|\(\d+(?:\&\d+)*\))+\))\)/$1/g;   s/\((\(\(\d+(?:\&\d+)*\)(?:\|\(\d+(?:\&\d+)*\))+\))\)/$1/g;
 # ((5&3)|(4&6))|(1&2)=(5&3)|(4&6)|(1&2)  # ((5&3)|(4&6))|(1&2)=(5&3)|(4&6)|(1&2)
     $expression=~      $expression=~
  s/\((\(\d+(?:\&\d+)*\))((?:\|\(\d+(?:\&\d+)*\))+)\)\|(\(\d+(?:\&\d+)*\))/\($1$2\|$3\)/g;   s/\((\(\d+(?:\&\d+)*\))((?:\|\(\d+(?:\&\d+)*\))+)\)\|(\(\d+(?:\&\d+)*\))/\($1$2\|$3\)/g;
Line 445  sub accinit { Line 443  sub accinit {
     foreach (split(/\,/,$hash{$_})) {      foreach (split(/\,/,$hash{$_})) {
  my $resid=$_;   my $resid=$_;
  my $uri=$hash{'src_'.$resid};   my $uri=$hash{'src_'.$resid};
  $uri=~s/^\/adm\/wrapper//;   my ($uripath,$urifile) =
  $uri=&Apache::lonnet::declutter($uri);      &Apache::lonnet::split_uri_for_cond($uri);
  my @uriparts=split(/\//,$uri);  
  my $urifile=$uriparts[$#uriparts];  
  $#uriparts--;  
  my $uripath=join('/',@uriparts);  
  if ($uripath) {   if ($uripath) {
     my $uricond='0';      my $uricond='0';
     if (defined($hash{'conditions_'.$resid})) {      if (defined($hash{'conditions_'.$resid})) {

Removed from v.1.99.2.1  
changed lines
  Added in v.1.100


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