--- loncom/homework/inputtags.pm 2008/12/09 00:27:20 1.252
+++ loncom/homework/inputtags.pm 2009/04/16 14:45:47 1.257
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.252 2008/12/09 00:27:20 raeburn Exp $
+# $Id: inputtags.pm,v 1.257 2009/04/16 14:45:47 onken Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -388,7 +388,8 @@ sub start_textline {
&& $Apache::lonhomework::type ne 'exam') {
my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval);
if ($size != 0) {$size=$size*2; $size.=' mm';} else {$size='40 mm';}
- if ($env{'form.pdfFormFields'} eq 'yes') {
+ if ($env{'form.pdfFormFields'} eq 'yes'
+ && $Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
my $fieldname = $env{'request.symb'}.
'&part_'. $Apache::inputtags::part.
'&textresponse'.
@@ -735,7 +736,7 @@ sub decideoutput {
'.disable_receipt_display'} ne 'yes') &&
($Apache::lonhomework::type ne 'practice')) {
$message.=(($target eq 'web')?'
':' ').
- &mt('Your receipt is [_1]',
+ &mt('Your receipt no. is [_1]',
(&Apache::lonnet::receipt($Apache::inputtags::part).
(($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'')));
}
@@ -817,7 +818,7 @@ sub decideoutput {
$css_class=$possible_class{'not_charged_try'};
$button=1;
} elsif ($award eq 'INVALID_FILETYPE') {
- $message = &mt('Submission won\'t be graded. The type of file submitted is not allowed.');
+ $message = &mt("Submission won't be graded. The type of file submitted is not allowed.");
$css_class=$possible_class{'not_charged_try'};
$button=1;
} elsif ($award eq 'SIG_FAIL') {
@@ -894,14 +895,27 @@ sub decideoutput {
my (undef,undef,$domain,$user)=&Apache::lonnet::whichuser();
foreach my $resid(@Apache::inputtags::response){
if ($Apache::lonhomework::history{"resource.$part.$resid.handback"}) {
- $message.='
';
+ if ($target eq 'tex') {
+ $message.= "\\\\\n";
+ } else {
+ $message.='
';
+ }
my @files = split(/\s*,\s*/,
$Apache::lonhomework::history{"resource.$part.$resid.handback"});
my $file_msg;
foreach my $file (@files) {
- $file_msg.= '
'.$file.'';
+ if ($target eq 'tex') {
+ $file_msg.= "\\\\\n".$file;
+ } else {
+ $file_msg.= '
'.$file.'';
+ }
}
$message .= &mt('Returned file(s): [_1]',$file_msg);
+ if ($target eq 'tex') {
+ $message.= "\\\\\n";
+ } else {
+ $message.='
';
+ }
}
}
@@ -1223,7 +1237,7 @@ sub get_grade_messages {
$trystr = '\vskip 0 mm ';
}
} else {
- $trystr = "