version 1.106, 2005/12/20 20:00:42
|
version 1.107, 2006/06/13 14:57:54
|
Line 117 sub caparesponse_check {
|
Line 117 sub caparesponse_check {
|
if ( $answer eq ($answer *1.0)) { $type = 2; |
if ( $answer eq ($answer *1.0)) { $type = 2; |
} else { $type = 3; } |
} else { $type = 3; } |
} else { |
} else { |
if ($type eq 'cs') { $type = 4; } |
if ($type eq 'cs') { $type = 4; } |
elsif ($type eq 'ci') { $type = 3 } |
elsif ($type eq 'ci') { $type = 3 } |
elsif ($type eq 'mc') { $type = 5; } |
elsif ($type eq 'mc') { $type = 5; } |
elsif ($type eq 'fml') { $type = 8; } |
elsif ($type eq 'fml') { $type = 8; } |
|
elsif ($type eq 'math') { $type = 9; } |
elsif ($type eq 'subj') { $type = 7; } |
elsif ($type eq 'subj') { $type = 7; } |
elsif ($type eq 'float') { $type = 2; } |
elsif ($type eq 'float') { $type = 2; } |
elsif ($type eq 'int') { $type = 1; } |
elsif ($type eq 'int') { $type = 1; } |
Line 149 sub caparesponse_check {
|
Line 150 sub caparesponse_check {
|
($sig_ubound,$sig_lbound)=&LONCAPA_INTERNAL_get_sigrange($sig); |
($sig_ubound,$sig_lbound)=&LONCAPA_INTERNAL_get_sigrange($sig); |
|
|
my $reterror=""; |
my $reterror=""; |
my $result = &caparesponse_capa_check_answer($response,$answer,$type, |
my $result; |
|
if ($type eq '9') { |
|
$result = &maxima_check($response,$answer,\$reterror); |
|
} else { |
|
$result = &caparesponse_capa_check_answer($response,$answer,$type, |
$tol_type,$tol, |
$tol_type,$tol, |
$sig_lbound,$sig_ubound, |
$sig_lbound,$sig_ubound, |
$ans_fmt,$unit,$calc,$id_list, |
$ans_fmt,$unit,$calc,$id_list, |
$points,$external::randomseed, |
$points,$external::randomseed, |
\$reterror); |
\$reterror); |
|
} |
if ($result == '1') { $result='EXACT_ANS'; } |
if ($result == '1') { $result='EXACT_ANS'; } |
elsif ($result == '2') { $result='APPROX_ANS'; } |
elsif ($result == '2') { $result='APPROX_ANS'; } |
elsif ($result == '3') { $result='SIG_FAIL'; } |
elsif ($result == '3') { $result='SIG_FAIL'; } |