[LON-CAPA-cvs] cvs: loncom /homework matchresponse.pm rankresponse.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 21 Oct 2004 06:35:58 -0000
albertel Thu Oct 21 02:35:58 2004 EDT
Modified files:
/loncom/homework rankresponse.pm matchresponse.pm
Log:
- <rank and match support survey mode BUG#36
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.39 loncom/homework/rankresponse.pm:1.40
--- loncom/homework/rankresponse.pm:1.39 Thu Oct 7 16:28:30 2004
+++ loncom/homework/rankresponse.pm Thu Oct 21 02:35:57 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# rank style response
#
-# $Id: rankresponse.pm,v 1.39 2004/10/07 20:28:30 albertel Exp $
+# $Id: rankresponse.pm,v 1.40 2004/10/21 06:35:57 albertel Exp $
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -235,9 +235,14 @@
$ad='MISSING_ANSWER';
}
}
+ if ($Apache::lonhomework::type eq 'survey' &&
+ ($ad eq 'INCORRECT' || $ad eq 'EXACT_ANS') ) {
+ $ad='SUBMITTED';
+ } else {
+ $Apache::lonhomework::results{"resource.$part.$id.submissiongrading"}=$gradestr;
+ }
$Apache::lonhomework::results{"resource.$part.$id.submission"}=
$responsestr;
- $Apache::lonhomework::results{"resource.$part.$id.submissiongrading"}=$gradestr;
$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=$ad;
&Apache::response::handle_previous(\%previous,$ad);
}
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.46 loncom/homework/matchresponse.pm:1.47
--- loncom/homework/matchresponse.pm:1.46 Thu Oct 7 16:28:30 2004
+++ loncom/homework/matchresponse.pm Thu Oct 21 02:35:57 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Full matching style response
#
-# $Id: matchresponse.pm,v 1.46 2004/10/07 20:28:30 albertel Exp $
+# $Id: matchresponse.pm,v 1.47 2004/10/21 06:35:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -350,7 +350,16 @@
$itemstr;
$Apache::lonhomework::results{"resource.$part.$id.submissiongrading"}=
$gradestr;
- if (!$Apache::lonhomework::scantronmode) {
+ if ($Apache::lonhomework::type eq 'survey') {
+ if ($ignored == 0) {
+ my $ad=$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}='SUBMITTED';
+ &Apache::response::handle_previous(\%previous,$ad);
+ } elsif ($wrong==0 && $right==0) {
+ } else {
+ my $ad=$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}='MISSING_ANSWER';
+ &Apache::response::handle_previous(\%previous,$ad);
+ }
+ } elsif (!$Apache::lonhomework::scantronmode) {
my $ad;
if ($wrong==0 && $ignored==0) {
$ad='EXACT_ANS';