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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 15 Mar 2005 17:25:51 -0000


albertel		Tue Mar 15 12:25:51 2005 EDT

  Modified files:              
    /rat	lonuserstate.pm 
  Log:
  - stop userstate from buiding symbs by hand
  
  
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.85 rat/lonuserstate.pm:1.86
--- rat/lonuserstate.pm:1.85	Tue Mar 15 12:21:42 2005
+++ rat/lonuserstate.pm	Tue Mar 15 12:25:51 2005
@@ -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.85 2005/03/15 17:21:42 albertel Exp $
+# $Id: lonuserstate.pm,v 1.86 2005/03/15 17:25:51 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -413,8 +413,8 @@
 		$acchash{'acc.cond.'.$short.'.'.$condcounter}=$expr;
 	    } 
 	} elsif ($_=~/^param_(\d+)\.(\d+)/) {
-	    my $prefix=&Apache::lonnet::declutter($hash{'map_id_'.$1}).
-		'___'.$2.'___'.&Apache::lonnet::declutter($hash{'src_'.$1.'.'.$2});
+	    my $prefix=&Apache::lonnet::encode_symb($hash{'map_id_'.$1},$2,
+						    $hash{'src_'.$1.'.'.$2});
 	    foreach (split(/\&/,$hash{$_})) {
 		my ($typename,$value)=split(/\=/,$_);
 		my ($type,$name)=split(/\:/,$typename);
@@ -504,11 +504,10 @@
 		$hash{'randomout_'.$currentrids[$k]}=1;
                 my ($mapid,$resid)=split(/\./,$currentrids[$k]);
                 $randomoutentry.='&'.
-		    &Apache::lonnet::symbclean(
-					       &Apache::lonnet::declutter($hash{'map_id_'.$mapid}).
-					       '___'.$resid.'___'.
-					       &Apache::lonnet::declutter($hash{'src_'.$currentrids[$k]})
-					       ).'&';
+		    &Apache::lonnet::encode_symb($hash{'map_id_'.$mapid},
+						 $resid,
+						 $hash{'src_'.$currentrids[$k]}
+						 ).'&';
             }
         }
     }
@@ -517,11 +516,8 @@
 	$hash{'randomout_'.$rid}=1;
 	my ($mapid,$resid)=split(/\./,$rid);
 	$randomoutentry.='&'.
-	    &Apache::lonnet::symbclean(
-				       &Apache::lonnet::declutter($hash{'map_id_'.$mapid}).
-				       '___'.$resid.'___'.
-				       &Apache::lonnet::declutter($hash{'src_'.$rid})
-				       ).'&';
+	    &Apache::lonnet::encode_symb($hash{'map_id_'.$mapid},$resid,
+					 $hash{'src_'.$rid}).'&';
     }
 # --------------------------------------- append randomout entry to environment
     if ($randomoutentry) {