[LON-CAPA-cvs] cvs: loncom /homework/caparesponse caparesponse.pm
raeburn
raeburn@source.lon-capa.org
Sun, 28 Feb 2010 23:45:44 -0000
raeburn Sun Feb 28 23:45:44 2010 EDT
Modified files:
/loncom/homework/caparesponse caparesponse.pm
Log:
- New awards for surveys:
ANONYMOUS ANONYMOUS_CREDIT SUBMITTED_CREDIT
- given for question types: anonsurvey, anonsurvey_cred, survey_cred.
- anonsurvey -- course personnel can not view both identity of submitter
and submission details.
- anonsurveycred -- same anonymity, but submitter receives 'awarded' for
submission
- surveycred - submitter receives 'awarded' for submission to survey.
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.236 loncom/homework/caparesponse/caparesponse.pm:1.237
--- loncom/homework/caparesponse/caparesponse.pm:1.236 Thu Jan 15 18:31:23 2009
+++ loncom/homework/caparesponse/caparesponse.pm Sun Feb 28 23:45:43 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# caparesponse definition
#
-# $Id: caparesponse.pm,v 1.236 2009/01/15 18:31:23 bisitz Exp $
+# $Id: caparesponse.pm,v 1.237 2010/02/28 23:45:43 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -533,11 +533,18 @@
$Apache::inputtags::params{'sig'});
}
&Apache::lonxml::debug("\n<br>result:$result:$Apache::lonxml::curdepth<br>\n");
- if ($Apache::lonhomework::type eq 'survey' &&
- ($ad eq 'INCORRECT' || $ad eq 'APPROX_ANS' ||
- $ad eq 'EXACT_ANS')) {
- $ad='SUBMITTED';
- }
+ if (($ad eq 'INCORRECT' || $ad eq 'APPROX_ANS' ||
+ $ad eq 'EXACT_ANS')) {
+ if ($Apache::lonhomework::type eq 'survey') {
+ $ad='SUBMITTED';
+ } elsif ($Apache::lonhomework::type eq 'surveycred') {
+ $ad='SUBMITTED_CREDIT';
+ } elsif ($Apache::lonhomework::type eq 'anonsurvey') {
+ $ad='ANONYMOUS';
+ } elsif ($Apache::lonhomework::type eq 'anonsurveycred') {
+ $ad='ANONYMOUS_CREDIT';
+ }
+ }
&Apache::response::handle_previous(\%previous,$ad);
$Apache::lonhomework::results{"resource.$partid.$id.awarddetail"}=$ad;
$Apache::lonhomework::results{"resource.$partid.$id.awardmsg"}=$msg;
@@ -1186,11 +1193,18 @@
\@final_msgs,
\@names,1);
}
- if ($Apache::lonhomework::type eq 'survey' &&
- ($ad eq 'INCORRECT' || $ad eq 'APPROX_ANS' ||
- $ad eq 'EXACT_ANS')) {
- $ad='SUBMITTED';
- }
+ if (($ad eq 'INCORRECT' || $ad eq 'APPROX_ANS' ||
+ $ad eq 'EXACT_ANS')) {
+ if ($Apache::lonhomework::type eq 'survey') {
+ $ad='SUBMITTED';
+ } elsif ($Apache::lonhomework::type eq 'surveycred') {
+ $ad='SUBMITTED_CREDIT';
+ } elsif ($Apache::lonhomework::type eq 'anonsurvey') {
+ $ad='ANONYMOUS';
+ } elsif ($Apache::lonhomework::type eq 'anonsurveycred') {
+ $ad='ANONYMOUS_CREDIT';
+ }
+ }
&Apache::response::handle_previous(\%previous,$ad);
$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=$ad;
$Apache::lonhomework::results{"resource.$part.$id.awardmsg"}=$msg;