--- loncom/publisher/lonpublisher.pm 2008/06/27 18:52:35 1.238
+++ loncom/publisher/lonpublisher.pm 2008/07/26 16:03:46 1.240
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.238 2008/06/27 18:52:35 bisitz Exp $
+# $Id: lonpublisher.pm,v 1.240 2008/07/26 16:03:46 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -274,7 +274,7 @@ sub metaread {
}
&metaeval($metastring,$prefix);
return '
'.&mt('Processed file').': '.
- &Apache::loncfile::display($fn).'';
+ &Apache::loncfile::display($fn).'
';
}
#########################################
@@ -325,7 +325,7 @@ string which presents the form field (fo
#########################################
#########################################
sub textfield {
- my ($title,$name,$value)=@_;
+ my ($title,$name,$value,$noline)=@_;
$value=~s/^\s+//gs;
$value=~s/\s+$//gs;
$value=~s/\s+/ /gs;
@@ -333,11 +333,11 @@ sub textfield {
$env{'form.'.$name}=$value;
return "\n".&Apache::lonhtmlcommon::row_title($title)
.''
- .&Apache::lonhtmlcommon::row_closure();
+ .&Apache::lonhtmlcommon::row_closure($noline);
}
sub text_with_browse_field {
- my ($title,$name,$value,$restriction)=@_;
+ my ($title,$name,$value,$restriction,$noline)=@_;
$value=~s/^\s+//gs;
$value=~s/\s+$//gs;
$value=~s/\s+/ /gs;
@@ -352,7 +352,7 @@ sub text_with_browse_field {
.''
.&mt('Search')
.''
- .&Apache::lonhtmlcommon::row_closure();
+ .&Apache::lonhtmlcommon::row_closure($noline);
}
sub hiddenfield {
@@ -797,7 +797,7 @@ sub fix_ids_and_indices {
}
if ((($token->[1] eq 'part') || ($token->[1] eq 'problem'))
&& (!$responsecounter)) {
- my $outstring=''.&mt('Found [_1] without responses',$token->[1]).'';
+ my $outstring=''.&mt('Found [_1] without responses. This resource cannot be published.',$token->[1]).'';
return ($outstring,1);
}
} else {
@@ -968,7 +968,7 @@ sub publish {
print $logfile "Copied original file to ".$copyfile."\n";
} else {
print $logfile "Unable to write backup ".$copyfile.':'.$!."\n";
- return ("Failed to write backup copy, $!,FAIL",1);
+ return ("".&mt("Failed to write backup copy, [_1], FAIL",$1)."",1);
}
# ------------------------------------------------------------- IDs and indices
@@ -1044,7 +1044,7 @@ sub publish {
unless ($batch) {
$scrout.='