--- loncom/interface/londocs.pm 2005/12/22 20:23:39 1.215
+++ loncom/interface/londocs.pm 2006/06/08 16:00:54 1.231
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.215 2005/12/22 20:23:39 albertel Exp $
+# $Id: londocs.pm,v 1.231 2006/06/08 16:00:54 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -42,6 +42,8 @@ use HTML::Entities;
use GDBM_File;
use Apache::lonlocal;
use Cwd;
+use lib '/home/httpd/lib/perl/';
+use LONCAPA;
my $iconpath;
@@ -119,16 +121,18 @@ sub authorhosts {
sub dumpbutton {
my ($home,$other,%outhash)=&authorhosts();
+ my $type = &Apache::loncommon::course_type();
if ($home+$other==0) { return ''; }
my $output='
';
if ($home) {
return '
'.
''.
+ &mt('Dump '.$type.' DOCS to Construction Space').'" />'.
&Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs');
} else {
return'
'.
- &mt('Dump Course DOCS to Construction Space: available on other servers');
+ &mt('Dump '.$type.
+ ' DOCS to Construction Space: available on other servers');
}
}
@@ -140,10 +144,9 @@ sub clean {
# -------------------------------------------------------- Actually dump course
sub dumpcourse {
- my $r=shift;
- my $html=&Apache::lonxml::xmlbegin();
- $r->print($html.'Dump DOCS'.
- &Apache::loncommon::bodytag('Dump Course DOCS to Construction Space').
+ my ($r) = @_;
+ my $type = &Apache::loncommon::course_type();
+ $r->print(&Apache::loncommon::start_page('Dump '.$type.' DOCS to Construction Space').
'');
+ '');
}
}
# ------------------------------------------------------ Generate "export" button
sub exportbutton {
+ my $type = &Apache::loncommon::course_type();
return '
'.
''.
+ &mt('Export '.$type.' to IMS').'" />'.
&Apache::loncommon::help_open_topic('Docs_Export_Course_Docs');
}
sub exportcourse {
my $r=shift;
+ 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;
@@ -300,7 +305,7 @@ sub exportcourse {
open(OUTPUT, "zip -r $imszip * 2> /dev/null |");
close(OUTPUT);
chdir $cwd;
- $outcome .= 'Download the zip file from IMS course archive ';
+ $outcome .= &mt('Download the zip file from IMS '.lc($type).' archive ',$imszipfile,);
if ($copyresult) {
$outcome .= 'The following errors occurred during export - '.$copyresult;
}
@@ -308,15 +313,13 @@ sub exportcourse {
$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. ';
}
}
- my $html=&Apache::lonxml::xmlbegin();
- $r->print($html.'Export Course'.
- &Apache::loncommon::bodytag('Export course to IMS content package'));
+ $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package'));
$r->print($outcome);
- $r->print('