version 1.187, 2005/03/10 02:34:58
|
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 1288 END
|
Line 1289 END
|
} |
} |
my $copyright_help = |
my $copyright_help = |
Apache::loncommon::help_open_topic('Publishing_Copyright'); |
Apache::loncommon::help_open_topic('Publishing_Copyright'); |
$intr_scrout =~ s/DISTRIBUTION:/'DISTRIBUTION: ' . $copyright_help/ge; |
$intr_scrout =~ s/Distribution:/'Distribution: ' . $copyright_help/ge; |
$intr_scrout.=&text_with_browse_field('Custom Distribution File','customdistributionfile',$metadatafields{'customdistributionfile'},'rights').$copyright_help; |
$intr_scrout.=&text_with_browse_field('Custom Distribution File','customdistributionfile',$metadatafields{'customdistributionfile'},'rights').$copyright_help; |
$intr_scrout.=&selectbox('Source Distribution','sourceavail', |
$intr_scrout.=&selectbox('Source Distribution','sourceavail', |
$defaultsourceoption, |
$defaultsourceoption, |
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 { |