--- loncom/imspackages/imsprocessor.pm 2005/05/28 01:32:32 1.21 +++ loncom/imspackages/imsprocessor.pm 2005/07/13 20:25:12 1.25 @@ -2893,8 +2893,10 @@ sub write_webct4_questions { $resourcedata{$symb.'randomize'} = 'yes'; $resourcedata{$symb.'maxfoils'} = 10; if ($context eq 'CSTR') { - $output = qq| + unless ($$settings{$id}{class} eq 'numerical') { + $output = qq| |; + } } $$total{prob} ++; if (exists($$settings{$id}{uri})) { @@ -3058,7 +3060,7 @@ sub write_webct4_questions { } else { $output .= qq| - + |; } } else { @@ -3249,11 +3251,34 @@ sub write_webct4_questions { } } } elsif ($$settings{$id}{class} eq 'numerical') { + my %mathfns = ( + 'abs' => 'abs', + 'acos' => 'acos', + 'asin' => 'asin', + 'atan' => 'atan', + 'ceil' => 'ceil', + 'cos' => 'cos', + 'exp' => 'exp', + 'fact' => 'factorial', + 'floor' => 'floor', + 'int' => 'int', + 'ln' => 'log', + 'log' => 'log', + 'max' => 'max', + 'min' => 'min', + 'round' => 'roundto', + 'sin' => 'sin', + 'sqrt' => 'sqrt', + 'tan' => 'tan', + ); + my $scriptblock = qq| |; if ($context eq 'CSTR') { - $output = $scriptblock.$output; + $output = "\n".$scriptblock.$output; my $ansformat = ''; my $sigfig = '0,15'; if ($$settings{$id}{$numid}{format} eq 'sig') {