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

raeburn lon-capa-cvs@mail.lon-capa.org
Tue, 12 Jul 2005 16:06:01 -0000


raeburn		Tue Jul 12 12:06:01 2005 EDT

  Modified files:              
    /loncom/imspackages	imsprocessor.pm 
  Log:
  Stop script block appearing before <problem> tag as it confuses the colorful editor.
  
  
Index: loncom/imspackages/imsprocessor.pm
diff -u loncom/imspackages/imsprocessor.pm:1.21 loncom/imspackages/imsprocessor.pm:1.22
--- loncom/imspackages/imsprocessor.pm:1.21	Fri May 27 21:32:32 2005
+++ loncom/imspackages/imsprocessor.pm	Tue Jul 12 12:05:59 2005
@@ -2893,8 +2893,10 @@
         $resourcedata{$symb.'randomize'} = 'yes';
         $resourcedata{$symb.'maxfoils'} = 10;
         if ($context eq 'CSTR') {
-            $output = qq|<problem>
+            unless ($$settings{$id}{class} eq 'numerical') {
+                $output = qq|<problem>
 |;
+            }
         }
         $$total{prob} ++;
         if (exists($$settings{$id}{uri})) {
@@ -3279,7 +3281,7 @@
 </script>
 |;
                     if ($context eq 'CSTR') {
-                        $output = $scriptblock.$output;
+                        $output = "<problem>\n".$scriptblock.$output;
                         my $ansformat = '';
                         my $sigfig = '0,15';
                         if ($$settings{$id}{$numid}{format} eq 'sig') {