[LON-CAPA-cvs] cvs: loncom /homework chemresponse.pm
raeburn
raeburn@source.lon-capa.org
Sun, 28 Feb 2010 23:35:53 -0000
raeburn Sun Feb 28 23:35:53 2010 EDT
Modified files:
/loncom/homework chemresponse.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/chemresponse.pm
diff -u loncom/homework/chemresponse.pm:1.86 loncom/homework/chemresponse.pm:1.87
--- loncom/homework/chemresponse.pm:1.86 Tue Dec 23 18:51:44 2008
+++ loncom/homework/chemresponse.pm Sun Feb 28 23:35:53 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# chemical equation style response
#
-# $Id: chemresponse.pm,v 1.86 2008/12/23 18:51:44 raeburn Exp $
+# $Id: chemresponse.pm,v 1.87 2010/02/28 23:35:53 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -304,9 +304,17 @@
$ad='INCORRECT';
}
}
- if ($ad && $Apache::lonhomework::type eq 'survey') {
- $ad='SUBMITTED';
- }
+ if ($ad) {
+ 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.molecule"}=$env{"form.MOLECULE_$id"};
@@ -558,9 +566,17 @@
$ad='INCORRECT';
}
}
- if ($ad && $Apache::lonhomework::type eq 'survey') {
- $ad='SUBMITTED';
- }
+ if ($ad) {
+ if ($Apache::lonhomework::type eq 'survey') {
+ $ad='SUBMITTED';
+ } elsif ($ad && $Apache::lonhomework::type eq 'surveycred') {
+ $ad='SUBMITTED_CREDIT';
+ } elsif ($ad && $Apache::lonhomework::type eq 'anonsurvey') {
+ $ad='ANONYMOUS';
+ } elsif ($ad && $Apache::lonhomework::type eq 'anonsurveycred') {
+ $ad='ANONYMOUS_CREDIT';
+ }
+ }
&Apache::response::handle_previous(\%previous,$ad);
$Apache::lonhomework::results{"resource.$partid.$id.awarddetail"}=$ad;
}