--- loncom/interface/londocs.pm 2013/12/30 21:10:36 1.574 +++ loncom/interface/londocs.pm 2013/12/31 13:38:31 1.575 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.574 2013/12/30 21:10:36 raeburn Exp $ +# $Id: londocs.pm,v 1.575 2013/12/31 13:38:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1124,6 +1124,7 @@ sub print_paste_buffer { my @currpaste = split(/,/,$env{'docs.markedcopies'}); my ($pasteitems,@pasteable); + my $clipboardcount = 0; # Construct identifiers for current contents of user's paste buffer foreach my $suffix (@currpaste) { @@ -1132,6 +1133,7 @@ sub print_paste_buffer { my $url = $env{'docs.markedcopy_url_'.$suffix}; if (($cid =~ /^$match_domain\_$match_courseid$/) && ($url ne '')) { + $clipboardcount ++; my ($is_external,$othercourse,$fromsupp,$is_uploaded_map,$parent, $canpaste,$nopaste,$othercrs,$areachange); my $extension = (split(/\./,$env{'docs.markedcopy_url_'.$suffix}))[-1]; @@ -1225,11 +1227,23 @@ sub print_paste_buffer { $pasteitems .= '
'; $form_start = ''; + $form_end = ''. + ''; } else { $pasteitems = &mt('Clipboard is empty'); } @@ -1383,6 +1397,24 @@ function validateClipboard() { } } +function checkClipboard() { + if (document.pasteform.pasting.length > 1) { + for (var i=0; i