--- loncom/publisher/lonpublisher.pm 2008/08/27 13:07:41 1.247
+++ loncom/publisher/lonpublisher.pm 2009/03/26 11:27:26 1.254
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.247 2008/08/27 13:07:41 raeburn Exp $
+# $Id: lonpublisher.pm,v 1.254 2009/03/26 11:27:26 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -695,6 +695,7 @@ sub fix_ids_and_indices {
$responsecounter=0;
}
if ($lctag=~/response$/) { $responsecounter++; }
+ if ($lctag eq 'import') { $responsecounter++; }
my %parms=%{$token->[2]};
$counter=$addid{$tag};
if (!$counter) { $counter=$addid{$lctag}; }
@@ -873,7 +874,7 @@ sub store_metadata {
}
if (defined($status) && $status ne '') {
$error=''
- .&mt('Error occured saving new values in metadata table in LON-CAPA database!')
+ .&mt('Error occurred saving new values in metadata table in LON-CAPA database!')
.'';
&Apache::lonnet::logthis($error);
&Apache::lonnet::logthis($status);
@@ -947,7 +948,7 @@ backup copies, performs any automatic pr
especially for rat and ssi files),
Returns a 2 element array, the first is the string to be shown to the
-user, the second is an error code, either 1 (an error occured) or 0
+user, the second is an error code, either 1 (an error occurred) or 0
(no error occurred)
I Creating old version '.$maxversion.' '.&mt('Creating old version [_1]',$maxversion).''.&mt('Metadata Information').' ' .
+ $scrout.='
'.&mt('Metadata').' ' .
&Apache::loncommon::help_open_topic("Metadata_Description")
. '
';
}
@@ -1281,11 +1282,11 @@ END
$keywordout.='';
@@ -1503,7 +1504,7 @@ sub phasetwo {
return 0;
}
if ($target=~/\.(\d+)\.(\w+)$/) {
- $r->print(''.&mt('Cannot publish versioned resource, FAIL').'');
+ $r->print(''.&mt('Filename of resource contains internal version number. Cannot publish such resources, FAIL').'');
return 0;
}
}
@@ -1651,14 +1652,14 @@ sub phasetwo {
unlink($srcd.'/'.$filename);
unlink($srcd.'/'.$filename.'.meta');
} else {
- if ($filename=~/\Q$srcf\E\.(\d+)\.\Q$srct\E$/) {
+ if ($filename=~/^\Q$srcf\E\.(\d+)\.\Q$srct\E$/) {
$maxversion=($1>$maxversion)?$1:$maxversion;
}
}
}
closedir(DIR);
$maxversion++;
- $r->print('
'.&mt('Done').'
'); + $r->print(''.&mt('Done').'
'); return 1; } @@ -1838,7 +1839,11 @@ sub batchpublish { my $thisembstyle=&Apache::loncommon::fileembstyle($thistype); - $r->print('