';
+ &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs');
}
@@ -280,6 +276,15 @@ sub exportcourse {
$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 '.lc($type).' to IMS content package').
+ '
IMS Export Failed
'.
+ '
'.
+ &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);
my $curRes;
my $outcome;
@@ -471,8 +476,7 @@ function containerCheck(item) {
$r->print($display.''.
'
'.
'
'.
- &Apache::loncommon::end_page());
+ &mt('Export '.$type.' DOCS').'" />');
}
}
@@ -1280,7 +1284,7 @@ sub do_paste_from_buffer {
# Maps need to be copied first
if (($url=~/\.(page|sequence)$/) && ($url=~/^\/uploaded\//)) {
$title=&mt('Copy of').' '.$title;
- my $newid=$$.time;
+ my $newid=$$.int(rand(100)).time;
my ($oldid,$ext) = ($url=~/^(.+)\.(\w+)$/);
if ($oldid =~ m{^(/uploaded/\Q$coursedom\E/\Q$coursenum\E/)(\D+)(\d+)$}) {
my $path = $1;
@@ -2136,19 +2140,27 @@ List Symbs
sub list_symbs {
my ($r) = @_;
+ my $type = &Apache::loncommon::course_type();
$r->print(&Apache::loncommon::start_page('Symb List'));
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Symb List'));
my $navmap = Apache::lonnavmaps::navmap->new();
- $r->print("
\n");
- foreach my $res ($navmap->retrieveResources()) {
- $r->print($res->compTitle()."\t".$res->symb()."\n");
+ if (!defined($navmap)) {
+ $r->print('
'.&mt('Retrieval of List Failed').'
'.
+ '
'.
+ &mt('Unable to retrieve information about course contents').
+ '
');
+ &Apache::lonnet::logthis('Symb list failed - could not create navmap object in '.lc($type).':'.$env{'request.course.id'});
+ } else {
+ $r->print("
ENDSUPFORM
@@ -3184,6 +3305,7 @@ ENDSUPFORM
');
}
+
} else {
unless ($upload_result eq 'phasetwo') {
# -------------------------------------------------------- This is showdoc mode
@@ -3198,6 +3320,76 @@ 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
+
+
+
+
+ENDOPTIONFORM
+
+}
+
+
+sub generate_edit_table {
+ my ($namehash_ref,$orderhash_ref) = @_;
+ #my %optionhash = %{$optionhash_ref}; #id verlinkt mit inhalt
+ my %namehash = %{$namehash_ref}; #name verlinkt mit id
+ my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name
+ my $form;
+ $form = '