version 1.138, 2004/03/02 16:09:42
|
version 1.139, 2004/03/12 16:55:35
|
Line 133 sub end_numericalresponse {
|
Line 133 sub end_numericalresponse {
|
my $hideunit=&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffunit'); |
my $hideunit=&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffunit'); |
|
|
foreach my $key (keys(%Apache::inputtags::params)) { |
foreach my $key (keys(%Apache::inputtags::params)) { |
$expression.= ';my $'. #' |
$expression.= ';my $__LC__'. #' |
$key.'="'.$Apache::inputtags::params{$key}.'"'; |
$key.'="'.$Apache::inputtags::params{$key}.'"'; |
} |
} |
|
|
#no way to enter units, with radio buttons |
#no way to enter units, with radio buttons |
if ($Apache::lonhomework::type eq 'exam' || |
if ($Apache::lonhomework::type eq 'exam' || |
lc($hideunit) eq "yes") { |
lc($hideunit) eq "yes") { |
$expression.=';my $unit=undef;'; |
$expression.=';my $__LC__unit=undef;'; |
} |
} |
#sig fig don't make much sense either |
#sig fig don't make much sense either |
if (($Apache::lonhomework::type eq 'exam' || |
if (($Apache::lonhomework::type eq 'exam' || |
$ENV{'form.submitted'} eq 'scantron') && |
$ENV{'form.submitted'} eq 'scantron') && |
$tag eq 'numericalresponse') { |
$tag eq 'numericalresponse') { |
$expression.=';my $sig=undef;'; |
$expression.=';my $__LC__sig=undef;'; |
} |
} |
|
|
if ($tag eq 'formularesponse') { |
if ($tag eq 'formularesponse') { |
$expression.=';my $type="fml";'; |
$expression.=';my $__LC__type="fml";'; |
} elsif ($tag eq 'numericalresponse') { |
} elsif ($tag eq 'numericalresponse') { |
$expression.=';my $type="float";'; |
$expression.=';my $__LC__type="float";'; |
} |
} |
$expression.="');"; |
$expression.="');"; |
my @answer=&Apache::lonxml::get_param_var('answer',$parstack,$safeeval); |
my @answer=&Apache::lonxml::get_param_var('answer',$parstack,$safeeval); |