--- loncom/interface/londocs.pm 2005/04/07 06:56:23 1.174
+++ loncom/interface/londocs.pm 2005/06/05 07:10:32 1.177
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.174 2005/04/07 06:56:23 albertel Exp $
+# $Id: londocs.pm,v 1.177 2005/06/05 07:10:32 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -272,22 +272,8 @@ sub exportcourse {
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['archive','discussion']);
- my @exportitems = ();
- if (defined($env{'form.archive'})) {
- if (ref($env{'form.archive'}) eq 'ARRAY') {
- @exportitems = @{$env{'form.archive'}};
- } else {
- $exportitems[0] = $env{'form.archive'};
- }
- }
- my @discussions = ();
- if (defined($env{'form.discussion'})) {
- if (ref($env{'form.discussion'}) eq 'ARRAY') {
- @discussions = $env{'form.discussion'};
- } else {
- $discussions[0] = $env{'form.discussion'};
- }
- }
+ my @exportitems = &Apache::loncommon::get_env_multiple('form.archive');
+ my @discussions = &Apache::loncommon::get_env_multiple('form.discussion');
if (@exportitems == 0 && @discussions == 0) {
$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 {
@@ -1851,25 +1837,29 @@ sub is_hash_old {
}
sub changewarning {
- my ($r,$postexec)=@_;
+ my ($r,$postexec,$message,$url)=@_;
if (!&is_hash_old()) { return; }
my $pathvar='folderpath';
my $path=&Apache::lonnet::escape($env{'form.folderpath'});
- if (defined($env{'form.pagepath'})) {
- $pathvar='pagepath';
- $path=&Apache::lonnet::escape($env{'form.pagepath'});
- $path.='&symb='.&Apache::lonnet::escape($env{'form.pagesymb'});
+ if (!defined($url)) {
+ if (defined($env{'form.pagepath'})) {
+ $pathvar='pagepath';
+ $path=&Apache::lonnet::escape($env{'form.pagepath'});
+ $path.='&symb='.&Apache::lonnet::escape($env{'form.pagesymb'});
+ }
+ $url='/adm/coursedocs?'.$pathvar.'='.$path;
+ }
+ if (!defined($message)) {
+ $message='Changes will become active for your current session after [_1], or the next time you log in.';
}
$r->print(
''.
'