[LON-CAPA-cvs] cvs: loncom /debugging_tools clone_trace.pl
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 13 Mar 2007 01:14:07 -0000
albertel Mon Mar 12 21:14:07 2007 EDT
Added files:
/loncom/debugging_tools clone_trace.pl
Log:
- helper script to folow the cloning history of a course
Index: loncom/debugging_tools/clone_trace.pl
+++ loncom/debugging_tools/clone_trace.pl
use strict;
use lib '/home/httpd/lib/perl/';
use LONCAPA;
use GDBM_File;
while (my $curl = shift) {
(my $domain,my $cid) = &LONCAPA::split_courseid($curl);
print("Clone history for $curl".$/);
while ($cid) {
print("\t$curl ");
my $envdb = &propath($domain,$cid).'/environment.db';
my $dbref=&LONCAPA::locking_hash_tie($envdb,&GDBM_READER());
$curl = &unescape($dbref->{'clonedfrom'});
my $desc = &unescape($dbref->{'description'});
&LONCAPA::locking_hash_untie($dbref);
print("($desc) <- ".$/);
($domain,$cid) = &LONCAPA::split_courseid($curl);
}
print("no clone info".$/);
}