[LON-CAPA-cvs] cvs: loncom /homework response.pm
raeburn
raeburn at source.lon-capa.org
Mon Apr 29 17:09:41 EDT 2013
raeburn Mon Apr 29 21:09:41 2013 EDT
Modified files:
/loncom/homework response.pm
Log:
- Appropriate award if question type is for a survey or anonymous survey
for customresponse and mathresponse.
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.232 loncom/homework/response.pm:1.233
--- loncom/homework/response.pm:1.232 Tue Dec 18 18:26:41 2012
+++ loncom/homework/response.pm Mon Apr 29 21:09:40 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.232 2012/12/18 18:26:41 raeburn Exp $
+# $Id: response.pm,v 1.233 2013/04/29 21:09:40 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -469,6 +469,18 @@
$error = $award;
$award = 'ERROR';
}
+ if (($award eq 'INCORRECT' || $award eq 'APPROX_ANS' ||
+ $award eq 'EXACT_ANS')) {
+ if ($Apache::lonhomework::type eq 'survey') {
+ $award='SUBMITTED';
+ } elsif ($Apache::lonhomework::type eq 'surveycred') {
+ $award='SUBMITTED_CREDIT';
+ } elsif ($Apache::lonhomework::type eq 'anonsurvey') {
+ $award='ANONYMOUS';
+ } elsif ($Apache::lonhomework::type eq 'anonsurveycred') {
+ $award='ANONYMOUS_CREDIT';
+ }
+ }
&Apache::response::handle_previous(\%previous,$award);
$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=
$award;
@@ -614,6 +626,18 @@
$error = $award;
$award = 'ERROR';
}
+ if (($award eq 'INCORRECT' || $award eq 'APPROX_ANS' ||
+ $award eq 'EXACT_ANS')) {
+ if ($Apache::lonhomework::type eq 'survey') {
+ $award='SUBMITTED';
+ } elsif ($Apache::lonhomework::type eq 'surveycred') {
+ $award='SUBMITTED_CREDIT';
+ } elsif ($Apache::lonhomework::type eq 'anonsurvey') {
+ $award='ANONYMOUS';
+ } elsif ($Apache::lonhomework::type eq 'anonsurveycred') {
+ $award='ANONYMOUS_CREDIT';
+ }
+ }
&Apache::response::handle_previous(\%previous,$award);
$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=
$award;
More information about the LON-CAPA-cvs
mailing list