version 1.188, 2005/03/10 03:50:49
|
version 1.191, 2005/04/04 23:55:17
|
Line 852 sub checkonthis {
|
Line 852 sub checkonthis {
|
my ($r,$source)=@_; |
my ($r,$source)=@_; |
my $uri=&Apache::lonnet::hreflocation($source); |
my $uri=&Apache::lonnet::hreflocation($source); |
$uri=~s/\/$//; |
$uri=~s/\/$//; |
my ($errorcount,$warningcount)=split(/:/, |
my $result=&Apache::lonnet::ssi_body($uri, |
&Apache::lonnet::ssi_body($uri, |
('grade_target'=>'web', |
('return_only_error_and_warning_counts' => 1))); |
'return_only_error_and_warning_counts' => 1)); |
|
my ($errorcount,$warningcount)=split(':',$result); |
if (($errorcount) || ($warningcount)) { |
if (($errorcount) || ($warningcount)) { |
$r->print('<br /><tt>'.$uri.'</tt>: '); |
$r->print('<br /><tt>'.$uri.'</tt>: '); |
if ($errorcount) { |
if ($errorcount) { |
Line 868 sub checkonthis {
|
Line 869 sub checkonthis {
|
&mt('warning(s)').'</font>'); |
&mt('warning(s)').'</font>'); |
} |
} |
} else { |
} else { |
$r->print('<font color="green">'.&mt('ok').'</font>'); |
#$r->print('<font color="green">'.&mt('ok').'</font>'); |
} |
} |
$r->rflush(); |
$r->rflush(); |
return ($warningcount,$errorcount); |
return ($warningcount,$errorcount); |
Line 2012 ENDDIFF
|
Line 2013 ENDDIFF
|
|
|
unless ($ENV{'form.phase'} eq 'two') { |
unless ($ENV{'form.phase'} eq 'two') { |
# ---------------------------------------------------------- Parse for problems |
# ---------------------------------------------------------- Parse for problems |
my ($warningcount,$errorcount)=&checkonthis($r,$thisfn); |
my ($warningcount,$errorcount); |
unless ($errorcount) { |
if ($thisembstyle eq 'ssi') { |
|
($warningcount,$errorcount)=&checkonthis($r,$thisfn); |
|
} |
|
unless ($errorcount) { |
my ($outstring,$error)= |
my ($outstring,$error)= |
&publish($thisfn,$thistarget,$thisembstyle); |
&publish($thisfn,$thistarget,$thisembstyle); |
$r->print('<hr />'.$outstring); |
$r->print('<hr />'.$outstring); |
} else { |
} else { |
$r->print('<h3>'. |
$r->print('<h3>'. |
&mt('The document contains errors and cannot be published.'). |
&mt('The document contains errors and cannot be published.'). |
'</h3>'); |
'</h3>'); |
} |
} |
} else { |
} else { |