[LON-CAPA-cvs] cvs: loncom /homework gradesubmission.pl
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 16 Nov 2005 23:34:27 -0000
albertel Wed Nov 16 18:34:27 2005 EDT
Modified files:
/loncom/homework gradesubmission.pl
Log:
- adding in a use of the correct_answer
Index: loncom/homework/gradesubmission.pl
diff -u loncom/homework/gradesubmission.pl:1.1 loncom/homework/gradesubmission.pl:1.2
--- loncom/homework/gradesubmission.pl:1.1 Tue Oct 18 11:33:55 2005
+++ loncom/homework/gradesubmission.pl Wed Nov 16 18:34:27 2005
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# example submissions grader for use with <externalresponse>
#
-# $Id: gradesubmission.pl,v 1.1 2005/10/18 15:33:55 albertel Exp $
+# $Id: gradesubmission.pl,v 1.2 2005/11/16 23:34:27 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -54,10 +54,15 @@
return ('APPROX_ANS','Go a!');
}
if ($form{'LONCAPA_student_response'} =~ /b/) {
- return ('EXACT_ANS','Go a!');
+ return ('EXACT_ANS','Go b!');
}
if ($form{'LONCAPA_student_response'} =~ /c/) {
return ('INCORRECT','No c');
}
+ if ($form{'LONCAPA_student_response'} eq
+ $form{'LONCAPA_correct_answer'}) {
+ return ('EXACT_ANS','Yep!');
+ }
+
return ('INCORRECT','Hrrm');
}