--- loncom/interface/londocs.pm 2009/10/23 17:21:03 1.403
+++ loncom/interface/londocs.pm 2009/10/31 19:54:51 1.408
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.403 2009/10/23 17:21:03 raeburn Exp $
+# $Id: londocs.pm,v 1.408 2009/10/31 19:54:51 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -117,15 +117,15 @@ 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) {
- my $link = "".&mt('Dump '.$type.' DOCS to Construction Space')."";
+ my $link = "".&mt('Dump '.$crstype.' DOCS to Construction Space')."";
return $link.' '.
&Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs').' ';
} else {
return '
'.
- &mt('Dump '.$type.
+ &mt('Dump '.$crstype.
' DOCS to Construction Space: available on other servers').
'
';
}
@@ -141,10 +141,10 @@ sub clean {
sub dumpcourse {
my ($r) = @_;
- my $type = &Apache::loncommon::course_type();
- $r->print(&Apache::loncommon::start_page('Dump '.$type.' DOCS to Construction Space').
+ my $crstype = &Apache::loncommon::course_type();
+ $r->print(&Apache::loncommon::start_page('Dump '.$crstype.' DOCS to Construction Space').
'');
+ '');
}
}
sub exportbutton {
- my $type = &Apache::loncommon::course_type();
+ my $crstype = &Apache::loncommon::course_type();
return "".&mt('IMS Export')."".
&Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').' ';
}
@@ -271,18 +271,28 @@ sub exportbutton {
sub exportcourse {
my $r=shift;
- my $type = &Apache::loncommon::course_type();
+ my $crstype = &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 '.$type.' to IMS Package').
+ $r->print(&Apache::loncommon::start_page('Export '.$crstype.' to IMS Package').
'
'.&mt('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'});
+ '
');
+ 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('
');
+ if ($crstype eq 'Community') {
+ $r->print(&mt('Return to Community Editor'));
+ } else {
+ $r->print(&mt('Return to Course Editor'));
+ }
+ $r->print('');
+ &Apache::lonnet::logthis('IMS export failed - could not create navmap object in '.lc($crstype).':'.$env{'request.course.id'});
return;
}
my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef);
@@ -353,7 +363,7 @@ sub exportcourse {
.'';
}
}
- $r->print(&Apache::loncommon::start_page('Export '.$type.' to IMS 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());
@@ -361,7 +371,7 @@ sub exportcourse {
my $display;
$display = '