--- loncom/interface/lonclonecourse.pm 2020/07/01 20:08:54 1.15 +++ loncom/interface/lonclonecourse.pm 2022/03/15 18:18:31 1.17 @@ -1,7 +1,7 @@ # The LearningOnline Network # routines for clone a course # -# $Id: lonclonecourse.pm,v 1.15 2020/07/01 20:08:54 raeburn Exp $ +# $Id: lonclonecourse.pm,v 1.17 2022/03/15 18:18:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -108,7 +108,7 @@ sub rewritefile { sub copyfile { my ($origcrsid,$newcrsid,$which)=@_; - unless ($which=~/\.sequence$/) { + unless ($which=~/\.(page|sequence)$/) { return &writefile($newcrsid,$which, &readfile($origcrsid,$which)); } else { @@ -230,6 +230,14 @@ sub copydb { 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 ($which,\%data,$newcrsdata{'domain'},$newcrsdata{'num'});