[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Tue, 08 Apr 2003 13:46:30 -0000
sakharuk Tue Apr 8 09:46:30 2003 EDT
Modified files:
/loncom/homework inputtags.pm
Log:
Added parameter in each problem and message is generated based on this parameter.
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.89 loncom/homework/inputtags.pm:1.90
--- loncom/homework/inputtags.pm:1.89 Mon Apr 7 22:37:58 2003
+++ loncom/homework/inputtags.pm Tue Apr 8 09:46:30 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.89 2003/04/08 02:37:58 albertel Exp $
+# $Id: inputtags.pm,v 1.90 2003/04/08 13:46:30 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -264,6 +264,8 @@
my $button=0;
my $previousmsg;
+ if (lc $Apache::lonhomework::problemstatus eq 'yes') {
+
if ($previous) { $previousmsg='You have entered that answer before'; }
if ($solved =~ /^correct/) {
@@ -336,7 +338,10 @@
$message = "Unknown message: $award";
$button=1;
}
- if ($Apache::lonhomework::type eq 'exam') {$message='';$previousmsg='';}
+ } elsif ($Apache::lonhomework::type eq 'exam') {
+ $message = "Answer Submitted";
+ $button=1;
+ }
return ($button,$message,$previousmsg);
}