[LON-CAPA-cvs] cvs: loncom /homework grades.pm /interface lonprintout.pm

raeburn raeburn at source.lon-capa.org
Sat Jun 11 10:38:28 EDT 2022


raeburn		Sat Jun 11 14:38:28 2022 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
    /loncom/homework	grades.pm 
  Log:
  - Ignore empty and commented out rows in bubblesheet format file.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.677 loncom/interface/lonprintout.pm:1.678
--- loncom/interface/lonprintout.pm:1.677	Sat Jun 11 14:20:41 2022
+++ loncom/interface/lonprintout.pm	Sat Jun 11 14:38:27 2022
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.677 2022/06/11 14:20:41 raeburn Exp $
+# $Id: lonprintout.pm,v 1.678 2022/06/11 14:38:27 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1236,6 +1236,7 @@
     my ($code_type, $code_length) = ('letter', 6);	# defaults.
     my @lines = &Apache::lonnet::get_scantronformat_file();
     foreach my $line (@lines) {
+        next if (($line =~ /^\#/) || ($line eq ''));
 	my ($name, $type, $length) = (split(/:/, $line))[0,2,4];
 	if($name eq $code_option) {
 	    $code_length = $length;
@@ -3240,6 +3241,7 @@
          my @lines = &Apache::lonnet::get_scantronformat_file();
 	 my ($code_type,$code_length,$bubbles_per_row)=('letter',6,10);
 	 foreach my $line (@lines) {
+             next if (($line =~ /^\#/) || ($line eq ''));
 	     my ($name,$type,$length,$bubbles_per_item) = 
                  (split(/:/,$line))[0,2,4,17];
 	     if ($name eq $code_option) {
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.789 loncom/homework/grades.pm:1.790
--- loncom/homework/grades.pm:1.789	Sat Jun 11 14:20:42 2022
+++ loncom/homework/grades.pm	Sat Jun 11 14:38:28 2022
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.789 2022/06/11 14:20:42 raeburn Exp $
+# $Id: grades.pm,v 1.790 2022/06/11 14:38:28 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -9611,7 +9611,7 @@
                             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 ++;
                             }
@@ -9805,6 +9805,7 @@
         my %unique_formats;
         my @formatlines = &Apache::lonnet::get_scantronformat_file();
         foreach my $line (@formatlines) {
+            next if (($line =~ /^\#/) || ($line eq ''));
             my @config = split(/:/,$line);
             my $idstart = $config[5];
             my $idlength = $config[6];




More information about the LON-CAPA-cvs mailing list