'.
- &mt('Dump '.$crstype.
+ &mt('Dump '.$type.
' DOCS to Construction Space: available on other servers').
'
';
}
@@ -143,10 +140,10 @@ sub clean {
sub dumpcourse {
my ($r) = @_;
- my $crstype = &Apache::loncommon::course_type();
- $r->print(&Apache::loncommon::start_page('Dump '.$crstype.' DOCS to Construction Space').
- '');
+ '');
}
}
sub exportbutton {
- my $crstype = &Apache::loncommon::course_type();
- return ''.
- &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').' ';
+ my $type = &Apache::loncommon::course_type();
+ return ''.
+ &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs');
}
sub exportcourse {
my $r=shift;
- my $crstype = &Apache::loncommon::course_type();
+ my $type = &Apache::loncommon::course_type();
my %discussiontime = &Apache::lonnet::dump('discussiontimes',
$env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'});
my $numdisc = keys(%discussiontime);
my $navmap = Apache::lonnavmaps::navmap->new();
if (!defined($navmap)) {
- $r->print(&Apache::loncommon::start_page('Export '.$crstype.' to IMS Package').
- '
'.&mt('IMS Export Failed').'
'.
- '
');
- if ($crstype eq 'Community') {
- $r->print(&mt('Unable to retrieve information about community contents'));
- } else {
- $r->print(&mt('Unable to retrieve information about course contents'));
- }
- $r->print('
'.
+ &mt('Unable to retrieve information about course contents').
+ '
'.&mt('Return to Course Editor').'');
+ &Apache::lonnet::logthis('IMS export failed - could not create navmap object in '.lc($type).':'.$env{'request.course.id'});
return;
}
my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef);
@@ -312,17 +298,7 @@ sub exportcourse {
my @exportitems = &Apache::loncommon::get_env_multiple('form.archive');
my @discussions = &Apache::loncommon::get_env_multiple('form.discussion');
if (@exportitems == 0 && @discussions == 0) {
- $outcome =
- '
'
- .&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.'
- ,''
- ,'')
- .'
';
+ $outcome = ' As you did not select any content items or discussions for export, an IMS package has not been created. Please go back to select either content items or discussions for export';
} else {
my $now = time;
my %symbs;
@@ -345,53 +321,35 @@ sub exportcourse {
open(OUTPUT, "zip -r $imszip * 2> /dev/null |");
close(OUTPUT);
chdir $cwd;
- $outcome .= '
'
- .&mt('[_1]Your IMS package[_2] is ready for download.'
- ,'','')
- .'
';
+ $outcome .= &mt('Download the zip file from IMS '.lc($type).' archive ',$imszipfile,);
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 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 '.$crstype.' to IMS Package'));
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('IMS Export'));
+ $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($outcome);
$r->print(&Apache::loncommon::end_page());
} else {
- my $display='
@@ -3291,6 +3291,79 @@ ENDSUPFORM
return OK;
}
+sub generate_admin_options {
+ my ($containertag,$uploadtag,$lt_ref,$help_ref,$env_ref) = @_;
+ my %lt = %{$lt_ref};
+ my %help = %{$help_ref};
+ my %env = %{$env_ref};
+ my $dumpbut=&dumpbutton();
+ my $exportbut=&exportbutton();
+ return (<
+
+
+
+
+ $containertag
+
+
+
+ $uploadtag
+
+
+
+
+ $help{'Verify_Content'}
+
+
+ $help{'Check_Resource_Versions'}
+
+
+ $dumpbut
+
+
+ $exportbut
+
+
+
+
+
+
+
+
+
+
+
+ENDOPTIONFORM
+
+}
+
+
+sub generate_edit_table {
+ my ($tid,$content,$navigation,$varcd,$namehash_ref,$orderhash_ref) = @_;
+ my %namehash = %{$namehash_ref}; #name verlinkt mit id
+ my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name
+ my $form;
+
+
+
+ $form = '