--- loncom/homework/externalresponse.pm 2010/12/20 20:15:55 1.17
+++ loncom/homework/externalresponse.pm 2014/02/26 20:52:11 1.19.10.1
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# external style responses
#
-# $Id: externalresponse.pm,v 1.17 2010/12/20 20:15:55 www Exp $
+# $Id: externalresponse.pm,v 1.19.10.1 2014/02/26 20:52:11 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -118,6 +118,10 @@ sub end_externalresponse {
$Apache::externalresponse::message=$Apache::loncapagrade::results{'message'};
&Apache::response::handle_previous(\%previous,
$Apache::loncapagrade::results{'awarddetail'});
+ if ($Apache::loncapagrade::results{'awarddetail'} eq 'ASSIGNED_SCORE') {
+ $Apache::lonhomework::results{"resource.$part.$id.awarded"}=
+ 1.*$Apache::loncapagrade::results{"awarded"};
+ }
&Apache::lonxml::debug("response of");
&Apache::lonhomework::showhash(%$res);
&Apache::lonxml::debug("capagrade of");
@@ -130,10 +134,11 @@ sub end_externalresponse {
if ($target eq 'web') {
&Apache::response::setup_prior_tries_hash(\&format_prior_response);
if (&Apache::response::show_answer()) {
- $result.='
'.&mt('Your answer:').' | '.&mt("Computer's answer information").' |
---|
'.
- $Apache::lonhomework::history{"resource.$part.$id.submission"}.
- ' | '.&Apache::lonxml::get_param('answerdisplay',$parstack,$safeeval).
- ' |
';
+ $result.=''.&mt('Your answer:').' |
---|
'.
+ &HTML::Entities::encode(
+ $Apache::lonhomework::history{"resource.$part.$id.submission"},'"<>&').
+ ' |
'.&Apache::lonxml::get_param('answerdisplay',$parstack,$safeeval).
+ '
';
}
if ($Apache::externalresponse::message) {
$result.='
'.$Apache::externalresponse::message.' |
';