--- loncom/publisher/lonpublisher.pm 2008/06/27 18:52:35 1.238
+++ loncom/publisher/lonpublisher.pm 2008/08/14 13:39:02 1.245
@@ -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.245 2008/08/14 13:39:02 onken Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -118,11 +118,14 @@ use Apache::File;
use File::Copy;
use Apache::Constants qw(:common :http :methods);
use HTML::LCParser;
+use HTML::Entities;
+use Encode::Encoder;
use Apache::lonxml;
use Apache::loncacc;
use DBI;
use Apache::lonnet;
use Apache::loncommon();
+use Apache::lonhtmlcommon;
use Apache::lonmysql;
use Apache::lonlocal;
use Apache::loncfile;
@@ -274,7 +277,7 @@ sub metaread {
}
&metaeval($metastring,$prefix);
return '
'.&mt('Processed file').': '.
- &Apache::loncfile::display($fn).'';
+ &Apache::loncfile::display($fn).'
';
}
#########################################
@@ -325,7 +328,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 +336,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 +355,7 @@ sub text_with_browse_field {
.''
.&mt('Search')
.''
- .&Apache::lonhtmlcommon::row_closure();
+ .&Apache::lonhtmlcommon::row_closure($noline);
}
sub hiddenfield {
@@ -797,7 +800,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 {
@@ -886,17 +889,21 @@ sub checkonthis {
'return_only_error_and_warning_counts' => 1));
my ($errorcount,$warningcount)=split(':',$result);
if (($errorcount) || ($warningcount)) {
- $r->print('
'.$uri.': ');
- if ($errorcount) {
- $r->print(''.
- $errorcount.' '.
- &mt('error(s)').' ');
- }
- if ($warningcount) {
- $r->print(''.
- $warningcount.' '.
- &mt('warning(s)').'');
- }
+ $r->print('