--- loncom/publisher/lonpublisher.pm 2008/08/27 13:07:41 1.247
+++ loncom/publisher/lonpublisher.pm 2009/04/04 20:06:43 1.256
@@ -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.256 2009/04/04 20:06:43 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('Created directory').' '.$parts[$count].' '
+ .&mt('Created directory [_1]'
+ ,''.$parts[$count].'')
+ .' '.&mt('Done').''.&mt('Metadata Information').' ' .
+ $scrout.='
'.&mt('Metadata').' ' .
&Apache::loncommon::help_open_topic("Metadata_Description")
. '
';
}
@@ -1281,11 +1282,11 @@ END
$keywordout.='';
@@ -1400,9 +1401,9 @@ END
(&Apache::loncommon::source_copyrightids));
# $intr_scrout.=&text_with_browse_field('Source Custom Distribution File','sourcerights',$metadatafields{'sourcerights'},'rights');
my $uctitle=&mt('Obsolete');
- my $obsolete_checked=($metadatafields{'obsolete'})?' checked="1" ':'';
+ my $obsolete_checked=($metadatafields{'obsolete'})?' checked="checked" ':'';
$intr_scrout.="\n".&Apache::lonhtmlcommon::row_title($uctitle)
- .''
+ .''
.&Apache::lonhtmlcommon::row_closure(1);
$intr_scrout.=&text_with_browse_field('Suggested Replacement for Obsolete File',
'obsoletereplacement',
@@ -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').'
'); return 1; } @@ -1838,7 +1844,11 @@ sub batchpublish { my $thisembstyle=&Apache::loncommon::fileembstyle($thistype); - $r->print(''.&mt('Created directory').' '.$parts[$count].'
'); mkdir($path,0777); + $r->print('' + .&mt('Created directory [_1]' + ,''.$parts[$count].'') + .'
' + ); } } @@ -1983,7 +1997,7 @@ sub defaultmetapublish { # ------------------------------------------------------------------- Link back my $link=$fn; $link=~s/^\/home\/$cuname\/public_html\//\/priv\/$cuname\//; - $r->print("".&mt('Back to Catalog Information').''); + $r->print("".&mt('Back to Metadata').''); $r->print(&Apache::loncommon::end_page()); return OK; } @@ -2168,7 +2182,11 @@ sub handler { my $thisembstyle=&Apache::loncommon::fileembstyle($thistype); if ($thistype eq 'page') { $thisembstyle = 'rat'; } - $r->print('