--- loncom/interface/londocs.pm 2009/04/07 20:12:55 1.362
+++ loncom/interface/londocs.pm 2010/09/23 21:25:43 1.438
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.362 2009/04/07 20:12:55 ehlerst Exp $
+# $Id: londocs.pm,v 1.438 2010/09/23 21:25:43 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -35,6 +35,7 @@ use Apache::Constants qw(:common :http);
use Apache::imsexport;
use Apache::lonnet;
use Apache::loncommon;
+use Apache::lonhtmlcommon;
use LONCAPA::map();
use Apache::lonratedt();
use Apache::lonxml;
@@ -72,7 +73,7 @@ sub storemap {
&LONCAPA::map::storemap('/uploaded/'.$coursedom.'/'.$coursenum.'/'.
$map,1);
if ($errtext) { return ($errtext,2); }
-
+
$hadchanges=1;
return ($errtext,0);
}
@@ -116,17 +117,22 @@ sub authorhosts {
sub dumpbutton {
my ($home,$other,%outhash)=&authorhosts();
- my $type = &Apache::loncommon::course_type();
+ my $crstype = &Apache::loncommon::course_type();
if ($home+$other==0) { return ''; }
if ($home) {
- return ''.
- &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs').'
';
- } else {
- return '
' + .&mt('As you did not select any content items or discussions' + .' for export, an IMS package has not been created.') + .'
' + .'' + .&mt('Please [_1]go back[_2] to select either content items' + .' or discussions for export.' + ,'' + ,'') + .'
'; } else { my $now = time; my %symbs; @@ -321,35 +346,53 @@ sub exportcourse { open(OUTPUT, "zip -r $imszip * 2> /dev/null |"); close(OUTPUT); chdir $cwd; - $outcome .= &mt('Download the zip file from IMS '.lc($type).' archive' + .&mt('[_1]Your IMS package[_2] is ready for download.' + ,'','') + .'
'; if ($copyresult) { - $outcome .= &mt('The following errors occurred during export - [_1]',$copyresult); + $outcome .= '' + .&mt('The following errors occurred during export - [_1]' + ,$copyresult) + .'
'; } } else { - $outcome = '' + .&mt('Unfortunately you will not be able to retrieve' + .' an IMS archive of your course 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')); - $r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package')); + $r->print(&Apache::loncommon::start_page('Export '.$crstype.' to IMS Package')); + $r->print(&Apache::lonhtmlcommon::breadcrumbs('IMS Export')); $r->print($outcome); $r->print(&Apache::loncommon::end_page()); } else { - my $display; - $display = ''); + &mt('Export').'" />'); } } @@ -859,7 +905,7 @@ sub extract_media { $repstatus = 'ok'; } } elsif ($caller eq 'uploaded') { - + $repstatus = &Apache::lonnet::getuploaded('GET',$embed_url,$cdom,$cnum,\$embed_content,$rtncode); } if ($repstatus eq 'ok') { @@ -924,7 +970,7 @@ sub group_import { if (($url =~ m{^/uploaded/\Q$coursedom\E/\Q$coursenum\E/(default_\d+\.)(page|sequence)$}) && ($caller eq 'londocs') && (!&Apache::lonnet::stat_file($url))) { - + my $errtext = ''; my $fatal = 0; my $newmapstr = '