[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Sun Nov 20 17:18:36 EST 2016


raeburn		Sun Nov 20 22:18:36 2016 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - Coding style: push()
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1262 loncom/interface/loncommon.pm:1.1263
--- loncom/interface/loncommon.pm:1.1262	Sun Nov 20 21:33:11 2016
+++ loncom/interface/loncommon.pm	Sun Nov 20 22:18:34 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1262 2016/11/20 21:33:11 raeburn Exp $
+# $Id: loncommon.pm,v 1.1263 2016/11/20 22:18:34 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -267,7 +267,7 @@
 		next if ($line =~ /^\#/);
 		chomp($line);
                 my ($extension,$category)=(split(/\s+/,$line,2));
-                push @{$category_extensions{lc($category)}},$extension;
+                push(@{$category_extensions{lc($category)}},$extension);
             }
             close($fh);
         }
@@ -1054,7 +1054,7 @@
 	if ($code) {
 	    my $selector    = $supported_codes{$id};
 	    my $description = &plainlanguagedescription($id);
-	    push (@lang_choices, [$selector, $description]);
+	    push(@lang_choices, [$selector, $description]);
 	}
     }
     return \@lang_choices;
@@ -1176,7 +1176,7 @@
         $result.="select2data${suffix}['d_$s1'].texts = new Array(";        
         my @s2texts;
         foreach my $value (@s2values) {
-            push @s2texts, $hashref->{$s1}->{'select2'}->{$value};
+            push(@s2texts, $hashref->{$s1}->{'select2'}->{$value});
         }
         $result.="\"@s2texts\");\n";
     }
@@ -10560,7 +10560,7 @@
         foreach (@currxlists) {
             if (m/^([^:]+):(\w*)$/) {
                 unless (grep/^$1$/,@{$allcourses}) {
-                    push @{$allcourses},$1;
+                    push(@{$allcourses},$1);
                     $$LC_code{$1} = $2;
                 }
             }
@@ -10573,7 +10573,7 @@
                 my $sec = $coursecode.$1;
                 my $lc_sec = $2;
                 unless (grep/^$sec$/,@{$allcourses}) {
-                    push @{$allcourses},$sec;
+                    push(@{$allcourses},$sec);
                     $$LC_code{$sec} = $lc_sec;
                 }
             }
@@ -14021,7 +14021,7 @@
         @Labels = @$labels;
     } else {
         for (my $i=0;$i<@{$Values[0]};$i++) {
-            push (@Labels,$i+1);
+            push(@Labels,$i+1);
         }
     }
     #
@@ -15438,7 +15438,7 @@
                 my $addcheck = &Apache::lonnet::auto_new_course($$crsunum,$$crsudom,$class,$cenv{'internal.courseowner'});
                 $cenv{'internal.sectionnums'} .= $item.',';
                 unless ($addcheck eq 'ok') {
-                    push @badclasses, $class;
+                    push(@badclasses,$class);
                 }
             }
             $cenv{'internal.sectionnums'} =~ s/,$//;
@@ -15466,7 +15466,7 @@
                 my $addcheck =  &Apache::lonnet::auto_new_course($$crsunum,$$crsudom,$xl,$cenv{'internal.courseowner'});
                 $cenv{'internal.crosslistings'} .= $item.',';
                 unless ($addcheck eq 'ok') {
-                    push @badclasses, $xl;
+                    push(@badclasses,$xl);
                 }
             }
             $cenv{'internal.crosslistings'} =~ s/,$//;
@@ -16630,7 +16630,7 @@
                 if (ref($courses{$cid}) eq 'HASH') {
                     if (ref($courses{$cid}{roles}) eq 'ARRAY') {
                         if (!grep(/^\Q$courserole\E$/,@{$courses{$cid}{roles}})) {
-                            push (@{$courses{$cid}{roles}},$courserole);
+                            push(@{$courses{$cid}{roles}},$courserole);
                         }
                     } else {
                         $courses{$cid}{roles} = [$courserole];




More information about the LON-CAPA-cvs mailing list