--- loncom/homework/optionresponse.pm 2008/12/10 21:48:21 1.157
+++ loncom/homework/optionresponse.pm 2009/05/04 13:42:50 1.158
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.157 2008/12/10 21:48:21 raeburn Exp $
+# $Id: optionresponse.pm,v 1.158 2009/05/04 13:42:50 onken Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -439,7 +439,8 @@ sub displayfoils {
my $lastopt=$lastresponse{$name};
my $optionlist="\n";
- if($target eq 'tex' and $env{'form.pdfFormFields'} eq 'yes') {
+ if($target eq 'tex' and $env{'form.pdfFormFields'} eq 'yes'
+ && $Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
my $fieldname = $env{'request.symb'}.'&part_'.$Apache::inputtags::part.'&optionresponse'.'&HWVAL_'.$Apache::inputtags::response['-1'].':'.$temp;
$optionlist = &Apache::lonxml::print_pdf_start_combobox($fieldname);
}
@@ -447,13 +448,15 @@ sub displayfoils {
foreach my $option (@opt) {
my $escopt=&HTML::Entities::encode($option,'\'"&<>');
if ($option eq $lastopt) {
- if ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes') {
+ if ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes'
+ && $Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
$optionlist .= &Apache::lonxml::print_pdf_add_combobox_option($option);
} else {
$optionlist.="\n";
}
} else {
- if ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes') {
+ if ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes'
+ && $Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
$optionlist .= &Apache::lonxml::print_pdf_add_combobox_option($option);
} else {
$optionlist.="\n";
@@ -516,9 +519,9 @@ sub displayfoils {
'\end{enumerate} \vskip -8 mm \strut ';
$internal_counter++;
}
- if ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes') {
- $text =~ s/.*indent(.*)$/$1/;
- $text = $1;
+ if ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes'
+ && $Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
+ $text =~ s/\\item//m;
$result .= " $optionlist ". &Apache::lonxml::print_pdf_end_combobox($text).'\strut \\\\';
$temp++;
}