version 1.702, 2023/07/11 22:24:29
|
version 1.703, 2023/07/16 03:50:54
|
Line 1485 sub print_paste_buffer {
|
Line 1485 sub print_paste_buffer {
|
$nopaste = &mt('Paste from another course unavailable.'); |
$nopaste = &mt('Paste from another course unavailable.'); |
} |
} |
} |
} |
|
} elsif ($url =~ m{/res/($match_domain)/($match_username)/}) { |
|
my ($audom,$auname) = ($1,$2); |
|
unless (($auname eq $coursenum) && ($audom eq $coursedom)) { |
|
if (&Apache::lonnet::is_course($audom,$auname)) { |
|
$canpaste = 0; |
|
$nopaste = &mt('Paste from another course unavailable.'); |
|
} |
|
} |
} |
} |
if ($canpaste) { |
if ($canpaste) { |
push(@pasteable,$suffix); |
push(@pasteable,$suffix); |
Line 1825 sub do_paste_from_buffer {
|
Line 1833 sub do_paste_from_buffer {
|
} |
} |
$srcdom{$suffix} = $srcd; |
$srcdom{$suffix} = $srcd; |
$srcnum{$suffix} = $srcn; |
$srcnum{$suffix} = $srcn; |
|
} elsif ($url =~ m{^/res/($match_domain)/($match_courseid)/}) { |
|
my ($audom,$auname) = ($1,$2); |
|
# When buffer was populated using an active role in a different course |
|
# disallow pasting of published resources from Course Authoring Space |
|
unless (($auname eq $coursenum) && ($audom eq $coursedom)) { |
|
if (&Apache::lonnet::is_course($audom,$auname)) { |
|
$othcrsres{$suffix} = 1; |
|
next; |
|
} |
|
} |
} |
} |
$srcmapidx{$suffix} = $mapidx; |
$srcmapidx{$suffix} = $mapidx; |
push(@dopaste,$suffix); |
push(@dopaste,$suffix); |
Line 1876 sub do_paste_from_buffer {
|
Line 1894 sub do_paste_from_buffer {
|
notinsupp => 'Paste failed: content type is not supported within Supplemental Content', |
notinsupp => 'Paste failed: content type is not supported within Supplemental Content', |
notincrs => 'Paste failed: Item is from a different course which you do not have rights to edit.', |
notincrs => 'Paste failed: Item is from a different course which you do not have rights to edit.', |
notindom => 'Paste failed: Item is an external tool from a course in a different domain.', |
notindom => 'Paste failed: Item is an external tool from a course in a different domain.', |
|
othcrsres => 'Paste failed: Item is a course-authored resource from a different course', |
duplicate => 'Paste failed: only one instance of a particular published sequence or page is allowed within each course.', |
duplicate => 'Paste failed: only one instance of a particular published sequence or page is allowed within each course.', |
); |
); |
|
|
Line 2522 sub contained_map_check {
|
Line 2541 sub contained_map_check {
|
next; |
next; |
} |
} |
} |
} |
|
if ($ressrc =~ m{^/res/($match_domain)/($match_courseid)/}) { |
|
my ($srcdom,$srcnum) = ($1,$2); |
|
unless (($srcnum eq $coursenum) && ($srcdom eq $coursedom)) { |
|
if (&Apache::lonnet::is_course($srcdom,$srcnum)) { |
|
$removefrommap->{$url}{$token->[2]->{'id'}} = $ressrc; |
|
next; |
|
} |
|
} |
|
} |
if ($ressrc =~ m{^/(res|uploaded)/.+\.(sequence|page)$}) { |
if ($ressrc =~ m{^/(res|uploaded)/.+\.(sequence|page)$}) { |
if ($1 eq 'uploaded') { |
if ($1 eq 'uploaded') { |
$hierarchy->{$url}{$token->[2]->{'id'}} = $ressrc; |
$hierarchy->{$url}{$token->[2]->{'id'}} = $ressrc; |
Line 9148 END
|
Line 9176 END
|
<sourceavail></sourceavail> |
<sourceavail></sourceavail> |
<standards></standards> |
<standards></standards> |
<subject></subject> |
<subject></subject> |
<title></title> |
<title>Course Authoring Rights</title> |
END |
END |
close($fh); |
close($fh); |
} |
} |