[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 14 Apr 2006 19:42:22 -0000
albertel Fri Apr 14 15:42:22 2006 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
- BUG#4734 -> when no codes to print don't add in the exec
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.435 loncom/interface/lonprintout.pm:1.436
--- loncom/interface/lonprintout.pm:1.435 Thu Apr 6 18:32:07 2006
+++ loncom/interface/lonprintout.pm Fri Apr 14 15:42:19 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.435 2006/04/06 22:32:07 foxr Exp $
+# $Id: lonprintout.pm,v 1.436 2006/04/14 19:42:19 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2293,12 +2293,13 @@
}
push(@{$helper->{DATA}{ALL_CODE_CHOICES}},[$code,$choice]);
}
- $code_selection .=
-'
- <exec>
- push(@{$state->{CHOICES}},@{$helper->{DATA}{ALL_CODE_CHOICES}});
- </exec>
- '.$/;
+ if (%codes_to_print) {
+ $code_selection .='
+ <exec>
+ push(@{$state->{CHOICES}},@{$helper->{DATA}{ALL_CODE_CHOICES}});
+ </exec>
+ '.$/;
+ }
open(FH,$Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab');