[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 28 Jun 2005 21:41:10 -0000
albertel Tue Jun 28 17:41:10 2005 EDT
Modified files:
/loncom/homework inputtags.pm
Log:
- the horror of partial correctness has been ushered in by exams need to do something wih it
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.169 loncom/homework/inputtags.pm:1.170
--- loncom/homework/inputtags.pm:1.169 Mon Jun 20 17:31:07 2005
+++ loncom/homework/inputtags.pm Tue Jun 28 17:41:08 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.169 2005/06/20 21:31:07 albertel Exp $
+# $Id: inputtags.pm,v 1.170 2005/06/28 21:41:08 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -418,18 +418,21 @@
if ($solved =~ /^correct/) {
$bgcolor=$possiblecolors{'correct'};
+ $message=&mt('You are correct.');
+ if ($awarded < 1 && $awarded > 0) {
+ $message=&mt('You are partially correct.');
+ $bgcolor=$possiblecolors{'not_charged_try'};
+ } elsif ($awarded < 1) {
+ $message=&mt('Incorrect.');
+ $bgcolor=$possiblecolors{'charged_try'};
+ }
if ($award eq 'ASSIGNED_SCORE') {
$message = &mt("A score has been assigned.");
- if ($awarded < 1 && $awarded > 0) {
- $bgcolor=$possiblecolors{'not_charged_try'};
- } elsif ($awarded < 1) {
- $bgcolor=$possiblecolors{'charged_try'};
- }
} else {
if ($target eq 'tex') {
- $message = '\textbf{'.&mt('You are correct.').'}';
+ $message = '\textbf{'.$message.'}';
} else {
- $message = "<b>".&mt('You are correct.')."</b>";
+ $message = "<b>".$message."</b>";
$message.=" ".&mt("Computer's answer now shown above.");
}
$added_computer_text=1;