[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sat, 12 Feb 2005 03:27:57 -0000
albertel Fri Feb 11 22:27:57 2005 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
- BUG#3731 blanks lines annoyed Grades upload
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.247 loncom/interface/loncommon.pm:1.248
--- loncom/interface/loncommon.pm:1.247 Mon Jan 24 19:27:59 2005
+++ loncom/interface/loncommon.pm Fri Feb 11 22:27:57 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.247 2005/01/25 00:27:59 albertel Exp $
+# $Id: loncommon.pm,v 1.248 2005/02/12 03:27:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3105,7 +3105,12 @@
sub upfile_record_sep {
if ($ENV{'form.upfiletype'} eq 'xml') {
} else {
- return split(/\n/,$ENV{'form.upfile'});
+ my @records;
+ foreach my $line (split(/\n/,$ENV{'form.upfile'})) {
+ if ($line=~/^\s*$/) { next; }
+ push(@records,$line);
+ }
+ return @records;
}
}