[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Sat Dec 18 21:45:48 EST 2021


raeburn		Sun Dec 19 02:45:48 2021 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Preserve trailing empty fields in uploaded bubblesheet csv data.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1474 loncom/lonnet/perl/lonnet.pm:1.1475
--- loncom/lonnet/perl/lonnet.pm:1.1474	Mon Dec  6 03:31:55 2021
+++ loncom/lonnet/perl/lonnet.pm	Sun Dec 19 02:45:48 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1474 2021/12/06 03:31:55 raeburn Exp $
+# $Id: lonnet.pm,v 1.1475 2021/12/19 02:45:48 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4659,7 +4659,7 @@
                     next if (($num == 1) && ($csvoptions{'hdr'} == 1));
                     $line =~ s{[\r\n]+$}{};
                     my %found;
-                    my @values = split(/,/,$line);
+                    my @values = split(/,/,$line,-1);
                     my ($qstart,$record);
                     for (my $i=0; $i<@values; $i++) {
                         if ((($qstart ne '') && ($i > $qstart)) ||




More information about the LON-CAPA-cvs mailing list