[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 08 May 2003 15:22:04 -0000
albertel Thu May 8 11:22:04 2003 EDT
Modified files:
/loncom/homework inputtags.pm
Log:
- BUG#1375 and BUG#723 are fixed by this, hide studen'ts response after correct
and still before due date
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.98 loncom/homework/inputtags.pm:1.99
--- loncom/homework/inputtags.pm:1.98 Tue May 6 11:31:45 2003
+++ loncom/homework/inputtags.pm Thu May 8 11:22:03 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.98 2003/05/06 15:31:45 albertel Exp $
+# $Id: inputtags.pm,v 1.99 2003/05/08 15:22:03 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -82,7 +82,9 @@
my $resid=$Apache::inputtags::response[-1];
if ($target eq 'web') {
$Apache::lonxml::evaluate--;
- if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
+ if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER' &&
+ $Apache::lonhomework::history{"resource.$id.solved"} =~/^correct/
+ ) {
my $partid=$Apache::inputtags::part;
my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$resid.submission"});
my $cols = &Apache::lonxml::get_param('cols',$parstack,$safeeval);
@@ -160,14 +162,16 @@
my $result = "";
if ($target eq 'web') {
$Apache::lonxml::evaluate--;
- if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
+ my $partid=$Apache::inputtags::part;
+ my $id=$Apache::inputtags::response[-1];
+ if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER' &&
+ $Apache::lonhomework::history{"resource.$id.solved"} =~/^correct/
+ ) {
my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval);
my $maxlength;
if ($size eq '') { $size=20; } else {
if ($size < 20) { $maxlength=$size; }
}
- my $partid=$Apache::inputtags::part;
- my $id=$Apache::inputtags::response[-1];
my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$id.submission"});
if ($Apache::lonhomework::type ne 'exam') {
$result= '<input type="text" name="HWVAL_'.$id.'" value="'.