version 1.15, 2020/07/01 20:08:54
|
version 1.19, 2024/12/12 17:48:15
|
Line 108 sub rewritefile {
|
Line 108 sub rewritefile {
|
|
|
sub copyfile { |
sub copyfile { |
my ($origcrsid,$newcrsid,$which)=@_; |
my ($origcrsid,$newcrsid,$which)=@_; |
unless ($which=~/\.sequence$/) { |
unless ($which=~/\.(page|sequence)$/) { |
return &writefile($newcrsid,$which, |
return &writefile($newcrsid,$which, |
&readfile($origcrsid,$which)); |
&readfile($origcrsid,$which)); |
} else { |
} else { |
Line 230 sub copydb {
|
Line 230 sub copydb {
|
return @info; |
return @info; |
} |
} |
} |
} |
|
} elsif ($which eq 'lti') { |
|
foreach my $key (keys(%data)) { |
|
if (ref($data{$key}) eq 'HASH') { |
|
if (exists($data{$key}{'usable'})) { |
|
delete($data{$key}{'usable'}); |
|
} |
|
} |
|
} |
} |
} |
my $putres = &Apache::lonnet::put |
my $putres = &Apache::lonnet::put |
($which,\%data,$newcrsdata{'domain'},$newcrsdata{'num'}); |
($which,\%data,$newcrsdata{'domain'},$newcrsdata{'num'}); |
Line 358 sub copydbfiles {
|
Line 366 sub copydbfiles {
|
if ($_=~/\.db$/) { |
if ($_=~/\.db$/) { |
unless ($_=~/^(nohist\_|disclikes|discussiontimes|classlist|versionupdate |
unless ($_=~/^(nohist\_|disclikes|discussiontimes|classlist|versionupdate |
|resourcedata|\Q$origcrs_discussion\E|slots|slot_reservations |
|resourcedata|\Q$origcrs_discussion\E|slots|slot_reservations |
|gradingqueue|reviewqueue|CODEs|groupmembership|comm_block)/) { |
|gradingqueue|reviewqueue|CODEs|groupmembership|comm_block |
|
|linkprot_passback_pending)/) { |
my @info = ©db($origcrsid,$newcrsid,$_,$newinstcode,$newowner, |
my @info = ©db($origcrsid,$newcrsid,$_,$newinstcode,$newowner, |
$tinyurls); |
$tinyurls); |
if (@info) { |
if (@info) { |