version 1.162, 2007/04/17 23:25:09
|
version 1.165, 2007/05/17 09:43:47
|
Line 447 sub end_customresponse {
|
Line 447 sub end_customresponse {
|
$result .= &Apache::response::answer_part('customresponse',$answer); |
$result .= &Apache::response::answer_part('customresponse',$answer); |
$result .= &Apache::response::answer_footer('customresponse'); |
$result .= &Apache::response::answer_footer('customresponse'); |
} |
} |
|
if ($target eq 'web') { |
|
&setup_prior_tries_hash(\&format_prior_response_math); |
|
} |
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || |
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || |
$target eq 'tex' || $target eq 'analyze') { |
$target eq 'tex' || $target eq 'analyze') { |
&Apache::lonxml::increment_counter(&Apache::response::repetition()); |
&Apache::lonxml::increment_counter(&Apache::response::repetition()); |
Line 459 sub end_customresponse {
|
Line 462 sub end_customresponse {
|
return $result; |
return $result; |
} |
} |
|
|
|
sub format_prior_response_custom { |
|
my ($mode,$answer) =@_; |
|
return '<span class="LC_prior_custom">'. |
|
&HTML::Entities::encode($answer,'"<>&').'</span>'; |
|
} |
|
|
sub start_mathresponse { |
sub start_mathresponse { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
Line 536 sub end_mathresponse {
|
Line 544 sub end_mathresponse {
|
} |
} |
} |
} |
} |
} |
|
if ($target eq 'web') { |
|
&setup_prior_tries_hash(\&format_prior_response_math); |
|
} |
|
|
pop(@Apache::lonxml::namespace); |
pop(@Apache::lonxml::namespace); |
pop(@Apache::response::custom_answer); |
pop(@Apache::response::custom_answer); |
pop(@Apache::response::custom_answer_type); |
pop(@Apache::response::custom_answer_type); |
Line 544 sub end_mathresponse {
|
Line 556 sub end_mathresponse {
|
return $result; |
return $result; |
} |
} |
|
|
|
sub format_prior_response_math { |
|
my ($mode,$answer) =@_; |
|
return '<span class="LC_prior_math">'. |
|
&HTML::Entities::encode($answer,'"<>&').'</span>'; |
|
} |
|
|
sub implicit_multiplication { |
sub implicit_multiplication { |
my ($expression)=@_; |
my ($expression)=@_; |
# Escape scientific notation, so 3e8 does not become 3*e*8 |
# Escape scientific notation, so 3e8 does not become 3*e*8 |
Line 1004 sub pick_foil_for_concept {
|
Line 1022 sub pick_foil_for_concept {
|
$Apache::response::conceptgroup{'names'}; |
$Apache::response::conceptgroup{'names'}; |
|
|
} |
} |
|
#------------------------------------------------------------ |
|
# |
|
# Get a parameter associated with a problem. |
|
# Parameters: |
|
# $id - the symb of the problem part within the map(?) ($part_$id). |
|
# $name - Name of the parameter to fetch |
|
# $default - Default value for the paramter. |
|
# |
|
# |
|
# |
sub get_response_param { |
sub get_response_param { |
my ($id,$name,$default)=@_; |
my ($id,$name,$default)=@_; |
my $parameter; |
my $parameter; |