version 1.190, 2006/06/13 14:58:14
|
version 1.192, 2006/06/19 16:16:21
|
Line 35 use Apache::lonlocal;
|
Line 35 use Apache::lonlocal;
|
use Apache::lonnet; |
use Apache::lonnet; |
|
|
BEGIN { |
BEGIN { |
&Apache::lonxml::register('Apache::caparesponse',('caparesponse','numericalresponse','stringresponse','formularesponse','mathresponse')); |
&Apache::lonxml::register('Apache::caparesponse',('caparesponse','numericalresponse','stringresponse','formularesponse')); |
} |
} |
|
|
my %answer; |
my %answer; |
Line 249 sub check_submission {
|
Line 249 sub check_submission {
|
} |
} |
|
|
if ($tag eq 'formularesponse') { |
if ($tag eq 'formularesponse') { |
$$args_ref{'type'}='fml'; |
if ($$args_ref{'samples'}) { |
} elsif ($tag eq 'mathresponse') { |
$$args_ref{'type'}='fml'; |
$$args_ref{'type'}='math'; |
} else { |
|
$$args_ref{'type'}='math'; |
|
} |
} elsif ($tag eq 'numericalresponse') { |
} elsif ($tag eq 'numericalresponse') { |
$$args_ref{'type'}='float'; |
$$args_ref{'type'}='float'; |
} |
} |
Line 929 sub end_formularesponse {
|
Line 931 sub end_formularesponse {
|
return end_numericalresponse(@_); |
return end_numericalresponse(@_); |
} |
} |
|
|
sub start_mathresponse { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
|
my $result; |
|
if ($target eq 'meta') { |
|
&Apache::response::start_response($parstack,$safeeval); |
|
$result=&Apache::response::meta_package_write('mathresponse'); |
|
&Apache::response::end_response(); |
|
} else { |
|
$result.=&start_numericalresponse(@_); |
|
} |
|
return $result; |
|
} |
|
|
|
sub end_mathresponse { |
|
return end_numericalresponse(@_); |
|
} |
|
|
|
1; |
1; |
__END__ |
__END__ |
|
|