version 1.94, 2015/09/01 14:11:26
|
version 1.95, 2015/09/01 16:40:20
|
Line 4554 sub print_textbook_form {
|
Line 4554 sub print_textbook_form {
|
$cc_clone .= $cdom.':'.$cnum.'&'; |
$cc_clone .= $cdom.':'.$cnum.'&'; |
unless (exists($cloneable{$cdom.'_'.$cnum})) { |
unless (exists($cloneable{$cdom.'_'.$cnum})) { |
my %courseinfo = &Apache::lonnet::coursedescription($cdom.'_'.$cnum,{'one_time' => 1}); |
my %courseinfo = &Apache::lonnet::coursedescription($cdom.'_'.$cnum,{'one_time' => 1}); |
$cloneable{$cdom.'_'.$cnum} = \%courseinfo; |
$cloneable{$cdom.'_'.$cnum} = { |
|
context => $courseinfo{'internal.creationcontext'}, |
|
created => $courseinfo{'internal.created'}, |
|
creator => $courseinfo{'internal.creator'}, |
|
description => $courseinfo{'description'}, |
|
inst_code => $courseinfo{'coursecode'}, |
|
owner => $courseinfo{'internal.courseowner'}, |
|
releaserequired => $courseinfo{'internal.releaserequired'}, |
|
type => $courseinfo{'type'}, |
|
}; |
} |
} |
} |
} |
|
|
Line 4849 sub clone_selection_table {
|
Line 4858 sub clone_selection_table {
|
my $cleantitle=&HTML::Entities::encode($title,'<>&"'); |
my $cleantitle=&HTML::Entities::encode($title,'<>&"'); |
$cleantitle=~s/'/\\'/g; |
$cleantitle=~s/'/\\'/g; |
$cleantitle =~ s/^\s+//; |
$cleantitle =~ s/^\s+//; |
my ($namestr,$singleowner,$otherowners,@owners,%ownernames); |
my ($namestr,@owners,%ownernames); |
if ($name eq 'colleague') { |
if ($cloneableref->{$cid}{'owner'} ne '') { |
$singleowner = $cloneableref->{$cid}{'owner'}; |
push(@owners,$cloneableref->{$cid}{'owner'}); |
$otherowners = $cloneableref->{$cid}{'co-owners'}; |
|
} else { |
|
$singleowner = $cloneableref->{$cid}{'internal.courseowner'}; |
|
$otherowners = $cloneableref->{$cid}{'internal.co-owners'}; |
|
} |
} |
if ($singleowner ne '') { |
if ($cloneableref->{$cid}{'co-owners'} ne '') { |
push(@owners,$singleowner); |
foreach my $item (split(/,/,$cloneableref->{$cid}{'co-owners'})) { |
} |
|
if ($otherowners ne '') { |
|
foreach my $item (split(/,/,$otherowners)) { |
|
if (($item ne '') && (!grep(/^\Q$item\E$/,@owners))) { |
if (($item ne '') && (!grep(/^\Q$item\E$/,@owners))) { |
push(@owners,$item); |
push(@owners,$item); |
} |
} |