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

raeburn raeburn at source.lon-capa.org
Wed Dec 10 20:14:40 EST 2014


raeburn		Thu Dec 11 01:14:40 2014 EDT

  Modified files:              
    /loncom/interface	lonclonecourse.pm 
  Log:
  - Coding style: keys()
  
  
Index: loncom/interface/lonclonecourse.pm
diff -u loncom/interface/lonclonecourse.pm:1.9 loncom/interface/lonclonecourse.pm:1.10
--- loncom/interface/lonclonecourse.pm:1.9	Sat Mar 10 02:45:35 2012
+++ loncom/interface/lonclonecourse.pm	Thu Dec 11 01:14:40 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # routines for clone a course
 #
-# $Id: lonclonecourse.pm,v 1.9 2012/03/10 02:45:35 raeburn Exp $
+# $Id: lonclonecourse.pm,v 1.10 2014/12/11 01:14:40 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -166,7 +166,7 @@
 	$startdate = $start{'default_enrollment_start_date'};
     }
 # ugly retro fix for broken version of types
-    foreach my $key (keys %data) {
+    foreach my $key (keys(%data)) {
 	if ($key=~/\wtype$/) {
 	    my $newkey=$key;
 	    $newkey=~s/type$/\.type/;
@@ -177,7 +177,7 @@
 # adjust symbs
     my $pattern='uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/';
     my $new=    'uploaded/'. $newcrsdata{'domain'}.'/'. $newcrsdata{'num'}.'/';
-    foreach my $key (keys %data) {
+    foreach my $key (keys(%data)) {
 	if ($key=~/\Q$pattern\E/) {
 	    my $newkey=$key;
 	    $newkey=~s/\Q$pattern\E/$new/;
@@ -186,7 +186,7 @@
 	}
     }
 #  transfer hash
-    foreach my $key (keys %data) {
+    foreach my $key (keys(%data)) {
 	my $thiskey=$key;
 	$thiskey=~s/^$origcrsid/$newcrsid/;
 	$newdata{$thiskey}=$data{$key};




More information about the LON-CAPA-cvs mailing list