version 1.191, 2006/06/19 13:59:21
|
version 1.193, 2006/07/03 14:21:45
|
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') { |
if ($$args_ref{'samples'}) { |
# if ($$args_ref{'samples'}) { |
$$args_ref{'type'}='fml'; |
$$args_ref{'type'}='fml'; |
} else { |
# } else { |
$$args_ref{'type'}='math'; |
# $$args_ref{'type'}='math'; |
} |
# } |
} elsif ($tag eq 'numericalresponse') { |
} elsif ($tag eq 'numericalresponse') { |
$$args_ref{'type'}='float'; |
$$args_ref{'type'}='float'; |
} |
} |
Line 931 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__ |
|
|