--- loncom/homework/grades.pm 2022/02/09 23:50:00 1.596.2.12.2.60 +++ loncom/homework/grades.pm 2023/01/16 19:27:43 1.596.2.12.2.60.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.596.2.12.2.60 2022/02/09 23:50:00 raeburn Exp $ +# $Id: grades.pm,v 1.596.2.12.2.60.2.1 2023/01/16 19:27:43 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -9343,7 +9343,7 @@ END my @lines = &Apache::lonnet::get_scantronformat_file(); my $count = 0; foreach my $line (@lines) { - next if ($line =~ /^#/); + next if (($line =~ /^\#/) || ($line eq '')); $singleline = $line; $count ++; } @@ -9505,7 +9505,7 @@ sub validate_uploaded_scantron_file { my %unique_formats; my @formatlines = &Apache::lonnet::get_scantronformat_file(); foreach my $line (@formatlines) { - chomp($line); + next if (($line =~ /^\#/) || ($line eq '')); my @config = split(/:/,$line); my $idstart = $config[5]; my $idlength = $config[6];