[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 04 Oct 2002 05:51:29 -0000


albertel		Fri Oct  4 01:51:29 2002 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  - part ids can be more than simple numbers
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.72 loncom/interface/lonparmset.pm:1.73
--- loncom/interface/lonparmset.pm:1.72	Thu Oct  3 18:31:58 2002
+++ loncom/interface/lonparmset.pm	Fri Oct  4 01:51:28 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.72 2002/10/03 22:31:58 albertel Exp $
+# $Id: lonparmset.pm,v 1.73 2002/10/04 05:51:28 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1196,7 +1196,7 @@
                     foreach (split(/\,/,$keyp{$rid})) {
                       my $tempkeyp = $_;
                       my $fullkeyp = $tempkeyp;
-                      $tempkeyp =~ s/_[\d_]+_/_0_/;
+                      $tempkeyp =~ s/_\w+_/_0_/;
                       
                       if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) {
                         $part{$tempkeyp}="0";
@@ -1204,7 +1204,7 @@
                         $display{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.display');
                         unless ($display{$tempkeyp}) { $display{$tempkeyp}=''; }
                         $display{$tempkeyp}.=' ('.$name{$tempkeyp}.')';
-                        $display{$tempkeyp} =~ s/_[\d_]+_/_0_/;
+                        $display{$tempkeyp} =~ s/_\w+_/_0_/;
                         $default{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp);
                         $type{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.type');
                       }
@@ -1278,14 +1278,14 @@
                 foreach (split(/\,/,$keyp{$rid})) {
                   my $tempkeyp = $_;
                   my $fullkeyp = $tempkeyp;
-                  $tempkeyp =~ s/_[\d_]+_/_0_/;
+                  $tempkeyp =~ s/_\w+_/_0_/;
                   if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) {
                     $part{$tempkeyp}="0";
                     $name{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.name');
                     $display{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.display');
                     unless ($display{$tempkeyp}) { $display{$tempkeyp}=''; }
                     $display{$tempkeyp}.=' ('.$name{$tempkeyp}.')';
-                    $display{$tempkeyp} =~ s/_[\d_]+_/_0_/;
+                    $display{$tempkeyp} =~ s/_\w+_/_0_/;
                     $default{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp);
                     $type{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.type');
                   }