--- loncom/homework/inputtags.pm 2008/03/17 15:40:31 1.242
+++ loncom/homework/inputtags.pm 2008/09/11 14:47:17 1.247
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.242 2008/03/17 15:40:31 bisitz Exp $
+# $Id: inputtags.pm,v 1.247 2008/09/11 14:47:17 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -358,8 +358,15 @@ 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';}
- $result='\framebox['.$size.'][s]{\tiny\strut}';
-
+ if ($env{'form.pdfFormFields'} eq 'yes') {
+ my $fieldname = $env{'request.symb'}.
+ '&part_'. $Apache::inputtags::part.
+ '&textresponse'.
+ '&HWVAL_' . $Apache::inputtags::response['-1'];
+ $result="\n\\\\\n".'\textField{'.$fieldname.'}{'.$size.'}{12 bp}';
+ } else {
+ $result='\framebox['.$size.'][s]{\tiny\strut}';
+ }
} elsif ($target eq 'tex'
&& $Apache::lonhomework::type eq 'exam'
&& &needs_exam_box($tagstack)) {
@@ -730,10 +737,13 @@ sub decideoutput {
$button = 1;
} elsif ($award eq 'MISSING_ANSWER') {
$message = &mt('Some items were not submitted.');
+ if ($target ne 'tex') {
+ $message .= &Apache::loncommon::help_open_topic('Some_Items_Were_Not_Submitted');
+ }
$css_class=$possible_class{'not_charged_try'};
$button = 1;
} elsif ($award eq 'ERROR') {
- $message = &mt('An error occured while grading your answer.');
+ $message = &mt('An error occurred while grading your answer.');
$css_class=$possible_class{'not_charged_try'};
$button = 1;
} elsif ($award eq 'TOO_LONG') {
@@ -849,7 +859,12 @@ sub decideoutput {
$added_computer_text=1;
}
if ($Apache::lonhomework::type eq 'practice') {
- $message.='
'.&mt('Submissions to practice problems are not permanently recorded.');
+ if ($target eq 'web') {
+ $message .= '
';
+ } else {
+ $message .= ' ';
+ }
+ $message.=&mt('Submissions to practice problems are not permanently recorded.');
}
return ($button,$css_class,$message,$previousmsg);
@@ -1081,7 +1096,7 @@ sub grade {
my ($match) =
&previous_match(\@Apache::inputtags::previous_version,
scalar(@Apache::inputtags::response));
-
+
if ($match) {
$previously_used = 'PREVIOUSLY_LAST';
foreach my $value (@Apache::inputtags::previous) {