--- loncom/homework/inputtags.pm 2006/12/22 18:30:07 1.212
+++ loncom/homework/inputtags.pm 2007/02/27 17:52:16 1.215
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.212 2006/12/22 18:30:07 albertel Exp $
+# $Id: inputtags.pm,v 1.215 2007/02/27 17:52:16 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -292,7 +292,9 @@ sub start_textline {
my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval);
my $maxlength;
if ($size eq '') { $size=20; } else {
- if ($size < 20) { $maxlength=$size; }
+ if ($size < 20) {
+ $maxlength = ' maxlength="'.$size.'"';
+ }
}
my $oldresponse = $Apache::lonhomework::history{"resource.$partid.$id.submission"};
&Apache::lonxml::debug("oldresponse $oldresponse is ".ref($oldresponse));
@@ -320,8 +322,8 @@ sub start_textline {
if ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER') {
$name = "none";
}
- $result.= '';
+ $result.= '';
}
if ($Apache::lonhomework::type eq 'exam'
&& &needs_exam_box($tagstack)) {
@@ -621,9 +623,10 @@ sub decideoutput {
$message.= $computer;
}
$added_computer_text=1;
- unless ($env{'course.'.
+ if ((!$env{'course.'.
$env{'request.course.id'}.
- '.disable_receipt_display'} eq 'yes') {
+ '.disable_receipt_display'} eq 'yes')&&
+ $env{'request.course.id'}) {
$message.=(($target eq 'web')?'
':' ').
&mt('Your receipt is').' '.&Apache::lonnet::receipt($Apache::inputtags::part).
(($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'');
@@ -1063,7 +1066,7 @@ sub gradestatus {
if ( $status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER') {$showbutton = 0;}
if ( $showbutton ) {
if ($target ne 'tex') {
- $button = '';
+ $button = '';
}
}
if ($Apache::lonhomework::history{"resource.$id.afterduedate"}) {