[LON-CAPA-cvs] cvs: loncom /imspackages imsprocessor.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Wed, 13 Jul 2005 21:21:04 -0000


raeburn		Wed Jul 13 17:21:04 2005 EDT

  Modified files:              
    /loncom/imspackages	imsprocessor.pm 
  Log:
  Fix scope for unitid; units now imported. 
  
  
Index: loncom/imspackages/imsprocessor.pm
diff -u loncom/imspackages/imsprocessor.pm:1.25 loncom/imspackages/imsprocessor.pm:1.26
--- loncom/imspackages/imsprocessor.pm:1.25	Wed Jul 13 16:25:12 2005
+++ loncom/imspackages/imsprocessor.pm	Wed Jul 13 17:21:01 2005
@@ -2095,7 +2095,7 @@
             $$settings{$id}{$numid}{toltype} = $attr->{type};
         }
         if ("@state" eq "questestinterop section item resprocessing itemproc_extension webct:x_webct_v01_autocalculate webct:x_webct_v01_unit") {
-            my $unitid = $attr->{ident};
+            $unitid = $attr->{ident};
             %{$$settings{$id}{$numid}{$unitid}} = ();
             push(@{$$settings{$id}{$numid}{units}},$unitid);
             $$settings{$id}{$numid}{$unitid}{value} = $attr->{value}; 
@@ -3323,7 +3323,7 @@
                         }
                         my $unitentry = '';
                         if ($unit ne '') {
-                            $unitentry =  'unit='.$unit;
+                            $unitentry =  'unit="'.$unit.'"';
                         }
                         $output .= qq|
 <numericalresponse $unitentry $ansformat  answer="\$answervar">