[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 21 May 2007 23:09:58 -0000
albertel Mon May 21 19:09:58 2007 EDT
Modified files:
/loncom/homework inputtags.pm
Log:
- don't bleed correctness info before the answer data if status is hideen
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.224 loncom/homework/inputtags.pm:1.225
--- loncom/homework/inputtags.pm:1.224 Mon May 21 18:57:17 2007
+++ loncom/homework/inputtags.pm Mon May 21 19:09:57 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.224 2007/05/21 22:57:17 albertel Exp $
+# $Id: inputtags.pm,v 1.225 2007/05/21 23:09:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -637,9 +637,6 @@
&mt('Your receipt is').' '.&Apache::lonnet::receipt($Apache::inputtags::part).
(($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'');
}
- &Apache::lonnet::logthis(" er \n$symb\n$message\n".$env{'course.'.
- $env{'request.course.id'}.
- '.disable_receipt_display'});
}
$button=0;
$previousmsg='';
@@ -1185,10 +1182,13 @@
my $previous = $count_lookup{$which};
$message =~ s{(</td>)}{ as submission # $previous $1};
} elsif ($Apache::lonhomework::history{"$prefix.tries"}) {
- if ( $Apache::lonhomework::history{"$prefix.solved"} =~
- /^correct/) {
+ if (!(lc($Apache::lonhomework::problemstatus) eq 'no'
+ && $Apache::inputtags::status[-1] ne 'SHOW_ANSWER')
+ && $Apache::lonhomework::history{"$prefix.solved"} =~/^correct/
+ ) {
+
$message =~ s{(<td.*?>)(.*?)(</td>)}
- {$1 <strong>Correct</strong>. $3};
+ {$1 <strong>Correct</strong>. $3}s;
}
my $trystr = "(Try ".
$Apache::lonhomework::history{"$prefix.tries"}.')';