--- loncom/homework/caparesponse/caparesponse.pm 2001/01/24 14:27:29 1.28 +++ loncom/homework/caparesponse/caparesponse.pm 2001/04/05 00:10:55 1.30 @@ -44,7 +44,7 @@ sub end_caparesponse { } } } - } else { + } elsif ($target eq 'web') { #$result .= "The correct answer is ".&Apache::run::run("{$$parstack['-1'];".'return $answer}',$safeeval)."\n"; } #Apache::lonxml::debug("\n
\nreal end caparesponse
\n"); @@ -74,6 +74,9 @@ sub end_numericalresponse { $Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.submission"}=$response; &Apache::lonxml::debug("submitted a $response
\n"); &Apache::lonxml::debug($$parstack[$#$parstack] . "\n
"); + $response =~ s/\\/\\\\/g; + $response =~ s/\'/\\\'/g; + &Apache::lonxml::debug("current $response"); my $expression="&caparesponse_check_list('".$response."','". $$parstack[$#$parstack]. ';my $tol="'.$Apache::inputtags::params{'tol'}.'"'.