[LON-CAPA-cvs] cvs: loncom(version_2_7_X) /interface lonprintout.pm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 23 Sep 2008 12:00:06 -0000
raeburn Tue Sep 23 08:00:06 2008 EDT
Modified files: (Branch: version_2_7_X)
/loncom/interface lonprintout.pm
Log:
- Backport 1.542.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.536.2.1 loncom/interface/lonprintout.pm:1.536.2.2
--- loncom/interface/lonprintout.pm:1.536.2.1 Sun Sep 21 17:25:21 2008
+++ loncom/interface/lonprintout.pm Tue Sep 23 08:00:05 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.536.2.1 2008/09/21 21:25:21 raeburn Exp $
+# $Id: lonprintout.pm,v 1.536.2.2 2008/09/23 12:00:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -385,8 +385,8 @@
sub is_code_valid {
my ($code_value, $code_option) = @_;
my ($code_type, $code_length) = ('letter', 6); # defaults.
- open(FG, $Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab');
- foreach my $line (<FG>) {
+ my @lines = &Apache::grades::get_scantronformat_file();
+ foreach my $line (@lines) {
my ($name, $type, $length) = (split(/:/, $line))[0,2,4];
if($name eq $code_option) {
$code_length = $length;
@@ -1934,9 +1934,9 @@
my $selected_code = $helper->{'VARS'}->{'CODE_SELECTED_FROM_LIST'};
my $code_option=$helper->{'VARS'}->{'CODE_OPTION'};
- open(FH,$Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab');
+ my @lines = &Apache::grades::get_scantronformat_file();
my ($code_type,$code_length)=('letter',6);
- foreach my $line (<FH>) {
+ foreach my $line (@lines) {
my ($name,$type,$length) = (split(/:/,$line))[0,2,4];
if ($name eq $code_option) {
$code_length=$length;
@@ -2854,10 +2854,9 @@
}
-
- open(FH,$Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab');
+ my @lines = &Apache::grades::get_scantronformat_file();
my $codechoice='';
- foreach my $line (<FH>) {
+ foreach my $line (@lines) {
my ($name,$description,$code_type,$code_length)=
(split(/:/,$line))[0,1,2,4];
if ($code_length > 0 &&