--- loncom/interface/londocs.pm 2007/06/29 21:08:07 1.280
+++ loncom/interface/londocs.pm 2007/06/29 23:25:30 1.281
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.280 2007/06/29 21:08:07 albertel Exp $
+# $Id: londocs.pm,v 1.281 2007/06/29 23:25:30 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -958,12 +958,6 @@ sub breadcrumbs {
my $folderpath;
my $cpinfo='';
my $plain='';
- if ($env{'form.markedcopy_url'}) {
- $cpinfo='&markedcopy_url='.
- &escape($env{'form.markedcopy_url'}).
- '&markedcopy_title='.
- &escape($env{'form.markedcopy_title'});
- }
my $randompick=-1;
my $isencrypted=0;
my $ishidden=0;
@@ -1187,28 +1181,77 @@ sub docs_change_log {
$r->print(&Apache::loncommon::end_data_table());
}
+sub update_paste_buffer {
+ my ($coursenum,$coursedom) = @_;
+
+ return if (!defined($env{'form.markcopy'}));
+ return if (!defined($env{'form.copyfolder'}));
+ return if ($env{'form.markcopy'} < 0);
+
+ my ($errtext,$fatal) = &mapread($coursenum,$coursedom,
+ $env{'form.copyfolder'});
+
+ return if ($fatal);
+
+# Mark for copying
+ my ($title,$url)=split(':',$LONCAPA::map::resources[$LONCAPA::map::order[$env{'form.markcopy'}]]);
+ if (&is_supplemental_title($title)) {
+ ($title) = &parse_supplemental_title($title);
+ }
+ &Apache::lonnet::appenv('docs.markedcopy_title' => $title,
+ 'docs.markedcopy_url' => $url);
+ delete($env{'form.markcopy'});
+}
+
+sub print_paste_buffer {
+ my ($r,$container) = @_;
+ return if (!defined($env{'docs.markedcopy_url'}));
+
+ $r->print(<