[LON-CAPA-cvs] cvs: rat / lonuserstate.pm

raeburn raeburn at source.lon-capa.org
Thu Aug 18 00:17:07 EDT 2011


raeburn		Thu Aug 18 04:17:07 2011 EDT

  Modified files:              
    /rat	lonuserstate.pm 
  Log:
  - More complete simplification: 8|8 -> 8
    - 8|8|8 -> 8 etc.
    - Scope remains for additional improvement, e.g.,  8|7|8 ->  8|7. 
  
  
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.140 rat/lonuserstate.pm:1.141
--- rat/lonuserstate.pm:1.140	Tue Aug  9 09:15:50 2011
+++ rat/lonuserstate.pm	Thu Aug 18 04:17:07 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construct and maintain state and binary representation of course for user
 #
-# $Id: lonuserstate.pm,v 1.140 2011/08/09 09:15:50 foxr Exp $
+# $Id: lonuserstate.pm,v 1.141 2011/08/18 04:17:07 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -801,7 +801,7 @@
 # 8&8=8
     $expression=~s/([^_\.\d])([_\.\d]+)\&\2([^_\.\d])/$1$2$3/g;
 # 8|8=8
-    $expression=~s/([^_\.\d])([_\.\d]+)\|\2([^_\.\d])/$1$2$3/g;
+    $expression=~s/([^_\.\d])([_\.\d]+)(?:\|\2)+([^_\.\d])/$1$2$3/g;
 # (5&3)&4=5&3&4
     $expression=~s/\(([_\.\d]+)((?:\&[_\.\d]+)+)\)\&([_\.\d]+[^_\.\d])/$1$2\&$3/g;
 # (((5&3)|(4&6)))=((5&3)|(4&6))




More information about the LON-CAPA-cvs mailing list