[LON-CAPA-cvs] cvs: loncom /imspackages imsimportdocs.pm
raeburn
raeburn at source.lon-capa.org
Wed Dec 10 19:35:54 EST 2014
raeburn Thu Dec 11 00:35:54 2014 EDT
Modified files:
/loncom/imspackages imsimportdocs.pm
Log:
- Coding style: keys() sort()
Index: loncom/imspackages/imsimportdocs.pm
diff -u loncom/imspackages/imsimportdocs.pm:1.33 loncom/imspackages/imsimportdocs.pm:1.34
--- loncom/imspackages/imsimportdocs.pm:1.33 Mon Dec 30 21:46:52 2013
+++ loncom/imspackages/imsimportdocs.pm Thu Dec 11 00:35:53 2014
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: imsimportdocs.pm,v 1.33 2013/12/30 21:46:52 raeburn Exp $
+# $Id: imsimportdocs.pm,v 1.34 2014/12/11 00:35:53 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -249,15 +249,15 @@
}
# Count areas depending on cms version
- foreach my $res (sort keys %resources) {
+ foreach my $res (sort(keys(%resources))) {
if ($cms eq 'bb5' || $cms eq 'bb6' || $cms eq 'webctce4') {
- foreach my $area (keys %{$cmsmap{$cms}}) {
+ foreach my $area (keys(%{$cmsmap{$cms}})) {
if ($resources{$res}{type} eq $cmsmap{$cms}{$area}) {
$count{$area} ++;
}
}
} elsif ($cms eq 'angel5') {
- foreach my $area (keys %{$cmsmap{$cms}}) {
+ foreach my $area (keys(%{$cmsmap{$cms}})) {
if ($area eq 'doc') {
if (grep/^$resources{$res}{type}$/,@{$cmsmap{$cms}{doc}}) {
$count{$area} ++;
@@ -457,16 +457,16 @@
my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo,'prepare',\%includedres,\%includeditems);
if ($manifest_result eq 'ok') {
- foreach my $res (sort keys %resources) {
+ foreach my $res (sort(keys(%resources))) {
if ($importareas{$resources{$res}{type}}) {
$includedres{$res} = 1;
}
}
- foreach my $itm (sort keys %items) {
+ foreach my $itm (sort(keys(%items))) {
&Apache::imsprocessor::get_imports(\%includeditems,\%items,\%resources,\%importareas,$itm);
}
}
- foreach my $itm (sort keys %includeditems) {
+ foreach my $itm (sort(keys(%includeditems))) {
&Apache::imsprocessor::get_parents(\%includeditems,\%items,$itm);
}
More information about the LON-CAPA-cvs
mailing list