--- loncom/interface/londocs.pm 2006/05/30 12:46:09 1.228
+++ loncom/interface/londocs.pm 2006/06/19 09:40:17 1.232
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.228 2006/05/30 12:46:09 www Exp $
+# $Id: londocs.pm,v 1.232 2006/06/19 09:40:17 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -121,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');
}
}
@@ -143,8 +145,8 @@ sub clean {
sub dumpcourse {
my ($r) = @_;
-
- $r->print(&Apache::loncommon::start_page('Dump Course DOCS to Construction Space').
+ 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;
@@ -301,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;
}
@@ -309,13 +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. ';
}
}
- $r->print(&Apache::loncommon::start_page('Export course to IMS content package'));
+ $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package'));
$r->print($outcome);
$r->print(&Apache::loncommon::end_page());
} else {
my $display;
$display = ''.
+ &mt('Export '.$type.' DOCS').'" />'.
&Apache::loncommon::end_page());
}
}
@@ -950,7 +954,6 @@ sub breadcrumbs {
my $folderpath;
my $cpinfo='';
if ($env{'form.markedcopy_url'}) {
- &Apache::lonnet::logthis('Found '.$env{'form.markedcopy_url'});
$cpinfo='&markedcopy_url='.
&escape($env{'form.markedcopy_url'}).
'&markedcopy_title='.
@@ -1764,9 +1767,10 @@ sub list_symbs {
#
sub verifycontent {
my ($r) = @_;
+ my $type = &Apache::loncommon::course_type();
my $loaderror=&Apache::lonnet::overloaderror($r);
if ($loaderror) { return $loaderror; }
- $r->print(&Apache::loncommon::start_page('Verify Course Documents'));
+ $r->print(&Apache::loncommon::start_page('Verify '.$type.' Documents'));
$hashtied=0;
undef %alreadyseen;
%alreadyseen=();
@@ -1775,7 +1779,7 @@ sub verifycontent {
if ($hash{$_}=~/\.(page|sequence)$/) {
if (($_=~/^src_/) && ($alreadyseen{&unescape($hash{$_})})) {
$r->print(''.
- &mt('The following sequence or page is included more than once in your course: ').
+ &mt('The following sequence or page is included more than once in your '.$type.': ').
&unescape($hash{$_}).' '.
&mt('Note that grading records for problems included in this sequence or folder will overlap.'));
}
@@ -1800,7 +1804,8 @@ sub devalidateversioncache {
sub checkversions {
my ($r) = @_;
- $r->print(&Apache::loncommon::start_page('Check Course Document Versions'));
+ my $type = &Apache::loncommon::course_type();
+ $r->print(&Apache::loncommon::start_page("Check $type Document Versions"));
my $header='';
my $startsel='';
my $monthsel='';
@@ -1861,7 +1866,7 @@ sub checkversions {
&changewarning($r,'');
if ($env{'form.timerange'} eq 'all') {
# show all documents
- $header=&mt('All Documents in Course');
+ $header=&mt('All Documents in '.$type);
$allsel=1;
foreach (keys %hash) {
if ($_=~/^ids\_(\/res\/.+)$/) {
@@ -1906,7 +1911,7 @@ sub checkversions {
$env{'course.'.$env{'request.course.id'}.'.domain'},
$env{'course.'.$env{'request.course.id'}.'.num'});
my %lt=&Apache::lonlocal::texthash
- ('st' => 'Version changes since start of Course',
+ ('st' => 'Version changes since start of '.$type,
'lm' => 'Version changes since last Month',
'lw' => 'Version changes since last Week',
'sy' => 'Version changes since Yesterday',
@@ -1915,9 +1920,9 @@ sub checkversions {
'fi' => 'File',
'md' => 'Modification Date',
'mr' => 'Most recently published Version',
- 've' => 'Version used in Course',
- 'vu' => 'Set Version to be used in Course',
-'sv' => 'Set Versions to be used in Course according to Selections below',
+ 've' => 'Version used in '.$type,
+ 'vu' => 'Set Version to be used in '.$type,
+'sv' => 'Set Versions to be used in '.$type.' according to Selections below',
'sm' => 'Keep all Resources up-to-date with most recent Versions (default)',
'sc' => 'Set all Resource Versions to current Version (Fix Versions)',
'di' => 'Differences');
@@ -1964,7 +1969,7 @@ ENDHEADERS
'
Most Recent: '.
''.$currentversion.''.
'
'.
- '
In Course: '.
+ '
In '.$type.': '.
'');
# Used in course
my $usedversion=$hash{'version_'.$linkurl};
@@ -2077,6 +2082,7 @@ sub changewarning {
}
$url='/adm/coursedocs?'.$pathvar.'='.$path;
}
+ my $course_type = &Apache::loncommon::course_type();
if (!defined($message)) {
$message='Changes will become active for your current session after [_1], or the next time you log in.';
}
@@ -2087,7 +2093,7 @@ sub changewarning {
'" />