--- loncom/interface/londocs.pm 2008/09/04 17:07:28 1.309
+++ loncom/interface/londocs.pm 2008/09/15 15:34:10 1.313
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.309 2008/09/04 17:07:28 raeburn Exp $
+# $Id: londocs.pm,v 1.313 2008/09/15 15:34:10 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -309,10 +309,10 @@ sub exportcourse {
chdir $cwd;
$outcome .= &mt('Download the zip file from IMS '.lc($type).' archive
',$imszipfile,);
if ($copyresult) {
- $outcome .= 'The following errors occurred during export - '.$copyresult;
+ $outcome .= &mt('The following errors occurred during export - [_1]',$copyresult);
}
} else {
- $outcome = '
Unfortunately you will not be able to retrieve an IMS archive of this posts at this time, because there was a problem creating a manifest file.
';
+ $outcome = '
'.&mt('Unfortunately you will not be able to retrieve an IMS archive of this posts at this time, because there was a problem creating a manifest file.').'
';
}
}
$r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package'));
@@ -924,7 +924,7 @@ sub group_import {
my $result=&Apache::lonnet::finishuserfileupload($coursenum,$coursedom,
'output',$1.$2);
if ($result != m|^/uploaded/|) {
- $errtext.='Map not saved: A network error occured when trying to save the new map. ';
+ $errtext.='Map not saved: A network error occurred when trying to save the new map. ';
$fatal = 2;
}
if ($fatal) {
@@ -1208,7 +1208,10 @@ sub update_paste_buffer {
# Mark for copying
my ($title,$url)=split(':',$LONCAPA::map::resources[$LONCAPA::map::order[$env{'form.markcopy'}]]);
if (&is_supplemental_title($title)) {
+ &Apache::lonnet::appenv({'docs.markedcopy_supplemental' => $title});
($title) = &parse_supplemental_title($title);
+ } elsif ($env{'docs.markedcopy_supplemental'}) {
+ &Apache::lonnet::delenv('docs\\.markedcopy_supplemental');
}
$url=~s{http(:|:)//https(:|:)//}{https$2//};
@@ -1257,7 +1260,7 @@ ENDPASTE
}
sub do_paste_from_buffer {
- my ($coursenum,$coursedom) = @_;
+ my ($coursenum,$coursedom,$folder) = @_;
return 0 if (!$env{'form.pastemarked'});
@@ -1299,6 +1302,20 @@ sub do_paste_from_buffer {
$url = &LONCAPA::map::qtunescape($url);
# Now insert the URL at the bottom
my $newidx = &LONCAPA::map::getresidx($url);
+ if ($env{'docs.markedcopy_supplemental'}) {
+ if ($folder =~ /^supplemental/) {
+ $title = $env{'docs.markedcopy_supplemental'};
+ } else {
+ (undef,undef,$title) =
+ &parse_supplemental_title($env{'docs.markedcopy_supplemental'});
+ }
+ } else {
+ if ($folder=~/^supplemental/) {
+ $title=time.'___&&&___'.$env{'user.name'}.'___&&&___'.
+ $env{'user.domain'}.'___&&&___'.$title;
+ }
+ }
+
$LONCAPA::map::resources[$newidx]= $title.':'.$url.':'.$ext.':normal:res';
push(@LONCAPA::map::order, $newidx);
# Store the result
@@ -1419,7 +1436,7 @@ sub editor {
}
if ($env{'form.pastemarked'}) {
- &do_paste_from_buffer($coursenum,$coursedom);
+ &do_paste_from_buffer($coursenum,$coursedom,$folder);
($errtext,$fatal) = &storemap($coursenum,$coursedom,$folder.'.'.$container);
return $errtext if ($fatal);
}
@@ -1496,7 +1513,9 @@ sub editor {
$r->print('