--- loncom/homework/inputtags.pm 2007/11/01 20:56:51 1.234
+++ loncom/homework/inputtags.pm 2007/11/17 02:03:46 1.235
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.234 2007/11/01 20:56:51 albertel Exp $
+# $Id: inputtags.pm,v 1.235 2007/11/17 02:03:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -667,14 +667,17 @@ sub decideoutput {
$message.= $computer;
}
$added_computer_text=1;
- my ($symb) = &Apache::lonnet::whichuser();
- if (($symb ne '')
- &&
- ($env{'course.'.$env{'request.course.id'}.
- '.disable_receipt_display'} ne 'yes')) {
- $message.=(($target eq 'web')?'
':' ').
- &mt('Your receipt is').' '.&Apache::lonnet::receipt($Apache::inputtags::part).
- (($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'');
+ if ($awarded > 0) {
+ my ($symb) = &Apache::lonnet::whichuser();
+ if (($symb ne '')
+ &&
+ ($env{'course.'.$env{'request.course.id'}.
+ '.disable_receipt_display'} ne 'yes')) {
+ $message.=(($target eq 'web')?'
':' ').
+ &mt('Your receipt is [_1]',
+ (&Apache::lonnet::receipt($Apache::inputtags::part).
+ (($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'')));
+ }
}
}
$button=0;
@@ -701,12 +704,14 @@ sub decideoutput {
$message.= $computer;
}
$added_computer_text=1;
- unless ($env{'course.'.
+ if ($awarded > 0
+ && $env{'course.'.
$env{'request.course.id'}.
- '.disable_receipt_display'} eq 'yes') {
+ '.disable_receipt_display'} ne 'yes') {
$message.=(($target eq 'web')?'
':' ').
- 'Your receipt is '.&Apache::lonnet::receipt($Apache::inputtags::part).
- (($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'');
+ &mt('Your receipt is [_1]',
+ (&Apache::lonnet::receipt($Apache::inputtags::part).
+ (($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'')));
}
$css_class=$possible_class{'correct'};
$button=0;