[LON-CAPA-cvs] cvs: loncom /homework matchresponse.pm optionresponse.pm
onken
onken@source.lon-capa.org
Tue, 27 Apr 2010 14:11:17 -0000
onken Tue Apr 27 14:11:17 2010 EDT
Modified files:
/loncom/homework matchresponse.pm optionresponse.pm
Log:
Removes PDF-forms fracments in printouts from problems in exam-mode.
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.79 loncom/homework/matchresponse.pm:1.80
--- loncom/homework/matchresponse.pm:1.79 Sun Feb 28 23:39:00 2010
+++ loncom/homework/matchresponse.pm Tue Apr 27 14:11:17 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Full matching style response
#
-# $Id: matchresponse.pm,v 1.79 2010/02/28 23:39:00 raeburn Exp $
+# $Id: matchresponse.pm,v 1.80 2010/04/27 14:11:17 onken Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -544,14 +544,16 @@
if ($target ne 'tex') {
$optionlist.="<option selected=\"on\">$option</option>\n";
} elsif ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes'
- && $Apache::inputtags::status['-1'] eq 'CAN_ANSWER') {
+ && $Apache::inputtags::status['-1'] eq 'CAN_ANSWER'
+ && $Apache::lonhomework::type ne 'exam') {
$optionlist .= &Apache::lonxml::print_pdf_add_combobox_option($option);
}
} else {
if ($target ne 'tex') {
$optionlist.="<option>$option</option>\n";
} elsif ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes'
- && $Apache::inputtags::status['-1'] eq 'CAN_ANSWER') {
+ && $Apache::inputtags::status['-1'] eq 'CAN_ANSWER'
+ && $Apache::lonhomework::type ne 'exam') {
$optionlist .= &Apache::lonxml::print_pdf_add_combobox_option($option);
}
}
@@ -596,7 +598,7 @@
# Note that if left or right positioned, we must
# confine the bubbles to righttabsize:
#
- if ($Apache::lonhomework::type eq 'exam' && $env{'form.pdfFormFields'} ne 'yes') {
+ if ($Apache::lonhomework::type eq 'exam') {
$question.=' '.$optionlist.$text."\n";
my @emptyItems = ();
for (my $i=0;$i<=$#used_letters;$i++) {push @emptyItems, ' ';}
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.163 loncom/homework/optionresponse.pm:1.164
--- loncom/homework/optionresponse.pm:1.163 Sun Feb 28 23:40:53 2010
+++ loncom/homework/optionresponse.pm Tue Apr 27 14:11:17 2010
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.163 2010/02/28 23:40:53 raeburn Exp $
+# $Id: optionresponse.pm,v 1.164 2010/04/27 14:11:17 onken Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -492,14 +492,16 @@
my $escopt=&HTML::Entities::encode($option,'\'"&<>');
if ($option eq $lastopt) {
if ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes'
- && $Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
+ && $Apache::inputtags::status[-1] eq 'CAN_ANSWER'
+ && $Apache::lonhomework::type ne 'exam') {
$optionlist .= &Apache::lonxml::print_pdf_add_combobox_option($option);
} else {
$optionlist.="<option value='".$escopt."' selected=\"selected\">$option</option>\n";
}
} else {
if ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes'
- && $Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
+ && $Apache::inputtags::status[-1] eq 'CAN_ANSWER'
+ && $Apache::lonhomework::type ne 'exam') {
$optionlist .= &Apache::lonxml::print_pdf_add_combobox_option($option);
} else {
$optionlist.="<option value='".$escopt."'>$option</option>\n";
@@ -587,7 +589,8 @@
$internal_counter++;
}
if ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes'
- && $Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
+ && $Apache::inputtags::status[-1] eq 'CAN_ANSWER'
+ && $Apache::lonhomework::type ne 'exam') {
$text =~ s/\\item//m;
$result .= " $optionlist ". &Apache::lonxml::print_pdf_end_combobox($text).'\strut \\\\';
$temp++;