--- loncom/interface/londocs.pm 2017/05/10 23:58:24 1.631 +++ loncom/interface/londocs.pm 2017/05/19 18:24:03 1.632 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.631 2017/05/10 23:58:24 raeburn Exp $ +# $Id: londocs.pm,v 1.632 2017/05/19 18:24:03 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1672,8 +1672,8 @@ sub do_paste_from_buffer { $srcdom{$suffix} = $srcd; $srcnum{$suffix} = $srcn; } elsif (($url =~ m{^/res/lib/templates/\w+\.problem$}) || - ($url =~ m{^/adm/$match_domain/$match_username/\d+/(bulletinboard|smppg|ext\.tool)$})) { - my $srctype= $1; + ($url =~ m{^/adm/$match_domain/$match_username/\d+/(bulletinboard|smppg)$}) || + ($url =~ m{^/adm/$match_domain/$match_courseid/\d+/ext\.tool$})) { my ($srcd,$srcn) = split(/_/,$cid); # When paste buffer was populated using an active role in a different course # check for mdc privilege in the course from which the resource was pasted @@ -1683,7 +1683,9 @@ sub do_paste_from_buffer { next; } } - if (($srctype eq 'ext.tool') && ($srcd ne $coursedom)) { +# When buffer was populated using an active role in a different course +# disallow pasting of External Tool if course is in a different domain. + if (($url =~ m{/ext\.tool$}) && ($srcd ne $coursedom)) { $notindom{$suffix} = 1; next; } @@ -4328,7 +4330,7 @@ $form_end; $line.=&Apache::loncommon::modal_link($link,$title,600,500); } } elsif (($hiddenfolder) || ($hiddenres)) { - $line.=$title.' '.&mt('(Hidden)').''; + $line.=$title.' ('.&mt('Hidden').')'; } else { $line.=$title.' '.$reinit.''; }