[LON-CAPA-cvs] cvs: modules /droeschl/Metadata harvestrun.pl /droeschl/Metadata/lib/Metadata Load.pm
droeschl
droeschl at source.lon-capa.org
Tue Jan 24 20:48:16 EST 2012
droeschl Wed Jan 25 01:48:16 2012 EDT
Modified files:
/modules/droeschl/Metadata harvestrun.pl
/modules/droeschl/Metadata/lib/Metadata Load.pm
Log:
Courses for resources that are only used in one course are now correctly recognized.
Index: modules/droeschl/Metadata/harvestrun.pl
diff -u modules/droeschl/Metadata/harvestrun.pl:1.2 modules/droeschl/Metadata/harvestrun.pl:1.3
--- modules/droeschl/Metadata/harvestrun.pl:1.2 Fri Jun 10 17:28:25 2011
+++ modules/droeschl/Metadata/harvestrun.pl Wed Jan 25 01:48:16 2012
@@ -20,7 +20,7 @@
$file = $c->clean();
print "Sorting...\n"; #sort -u similar to sort $file | uniq
-system("/usr/bin/sort","-u", "-o",$file, $file) == 0 #but uniq shortens lines!
+system("sort","-u", "-o",$file, $file) == 0 #but uniq shortens lines!
or die $?; #unfortunately this has to be done 'manually' as of yet
@@ -31,4 +31,4 @@
remove =>1, );
print "Loading...\n";
-print "Files can be found in:" . $l->load();
+print "Files can be found in:" . $l->load() . "\n";
Index: modules/droeschl/Metadata/lib/Metadata/Load.pm
diff -u modules/droeschl/Metadata/lib/Metadata/Load.pm:1.2 modules/droeschl/Metadata/lib/Metadata/Load.pm:1.3
--- modules/droeschl/Metadata/lib/Metadata/Load.pm:1.2 Tue Jan 24 22:45:45 2012
+++ modules/droeschl/Metadata/lib/Metadata/Load.pm Wed Jan 25 01:48:16 2012
@@ -127,7 +127,7 @@
my %map = ();
for (qw( copyright course_list ))
{
- $map{ $_ } = sub { return [ ${$_[0]} ] unless ${$_[0]} =~ /,/; ${$_[0]} = [ split /,/, ${$_[0]} ]};
+ $map{ $_ } = sub { ${$_[0]} = [ split /,/, ${$_[0]} ]};
}
# split at , and also count
More information about the LON-CAPA-cvs
mailing list