version 1.239, 2008/06/30 18:10:24
|
version 1.249.2.3, 2009/11/24 01:01:28
|
Line 118 use Apache::File;
|
Line 118 use Apache::File;
|
use File::Copy; |
use File::Copy; |
use Apache::Constants qw(:common :http :methods); |
use Apache::Constants qw(:common :http :methods); |
use HTML::LCParser; |
use HTML::LCParser; |
|
use HTML::Entities; |
|
use Encode::Encoder; |
use Apache::lonxml; |
use Apache::lonxml; |
use Apache::loncacc; |
use Apache::loncacc; |
use DBI; |
use DBI; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon(); |
use Apache::loncommon(); |
|
use Apache::lonhtmlcommon; |
use Apache::lonmysql; |
use Apache::lonmysql; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::loncfile; |
use Apache::loncfile; |
Line 263 sub metaread {
|
Line 266 sub metaread {
|
my ($logfile,$fn,$prefix)=@_; |
my ($logfile,$fn,$prefix)=@_; |
unless (-e $fn) { |
unless (-e $fn) { |
print($logfile 'No file '.$fn."\n"); |
print($logfile 'No file '.$fn."\n"); |
return '<br /><b>'.&mt('No file').':</b> <tt>'. |
return '<div><b>' |
&Apache::loncfile::display($fn).'</tt>'; |
.&mt('No file: [_1]' |
|
,'</b> <tt>'.&Apache::loncfile::display($fn).'</tt></div>'); |
} |
} |
print($logfile 'Processing '.$fn."\n"); |
print($logfile 'Processing '.$fn."\n"); |
my $metastring; |
my $metastring; |
Line 273 sub metaread {
|
Line 277 sub metaread {
|
$metastring=join('',<$metafh>); |
$metastring=join('',<$metafh>); |
} |
} |
&metaeval($metastring,$prefix); |
&metaeval($metastring,$prefix); |
return '<br /><b>'.&mt('Processed file').':</b> <tt>'. |
return '<div><b>' |
&Apache::loncfile::display($fn).'</tt><br />'; |
.&mt('Processed file: [_1]' |
|
,'</b> <tt>'.&Apache::loncfile::display($fn).'</tt></div>'); |
} |
} |
|
|
######################################### |
######################################### |
Line 325 string which presents the form field (fo
|
Line 330 string which presents the form field (fo
|
######################################### |
######################################### |
######################################### |
######################################### |
sub textfield { |
sub textfield { |
my ($title,$name,$value)=@_; |
my ($title,$name,$value,$noline)=@_; |
$value=~s/^\s+//gs; |
$value=~s/^\s+//gs; |
$value=~s/\s+$//gs; |
$value=~s/\s+$//gs; |
$value=~s/\s+/ /gs; |
$value=~s/\s+/ /gs; |
Line 333 sub textfield {
|
Line 338 sub textfield {
|
$env{'form.'.$name}=$value; |
$env{'form.'.$name}=$value; |
return "\n".&Apache::lonhtmlcommon::row_title($title) |
return "\n".&Apache::lonhtmlcommon::row_title($title) |
.'<input type="text" name="'.$name.'" size="80" value="'.$value.'" />' |
.'<input type="text" name="'.$name.'" size="80" value="'.$value.'" />' |
.&Apache::lonhtmlcommon::row_closure(); |
.&Apache::lonhtmlcommon::row_closure($noline); |
} |
} |
|
|
sub text_with_browse_field { |
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; |
$value=~s/\s+$//gs; |
$value=~s/\s+/ /gs; |
$value=~s/\s+/ /gs; |
Line 352 sub text_with_browse_field {
|
Line 357 sub text_with_browse_field {
|
.'<a href="javascript:opensearcher(\'pubform\',\''.$name.'\');">' |
.'<a href="javascript:opensearcher(\'pubform\',\''.$name.'\');">' |
.&mt('Search') |
.&mt('Search') |
.'</a>' |
.'</a>' |
.&Apache::lonhtmlcommon::row_closure(); |
.&Apache::lonhtmlcommon::row_closure($noline); |
} |
} |
|
|
sub hiddenfield { |
sub hiddenfield { |
Line 690 sub fix_ids_and_indices {
|
Line 695 sub fix_ids_and_indices {
|
$responsecounter=0; |
$responsecounter=0; |
} |
} |
if ($lctag=~/response$/) { $responsecounter++; } |
if ($lctag=~/response$/) { $responsecounter++; } |
|
if ($lctag eq 'import') { $responsecounter++; } |
my %parms=%{$token->[2]}; |
my %parms=%{$token->[2]}; |
$counter=$addid{$tag}; |
$counter=$addid{$tag}; |
if (!$counter) { $counter=$addid{$lctag}; } |
if (!$counter) { $counter=$addid{$lctag}; } |
Line 842 sub store_metadata {
|
Line 848 sub store_metadata {
|
# Determine if the table exists |
# Determine if the table exists |
my $status = &Apache::lonmysql::check_table('metadata'); |
my $status = &Apache::lonmysql::check_table('metadata'); |
if (! defined($status)) { |
if (! defined($status)) { |
$error='<span class="LC_error">WARNING: Cannot connect to '. |
$error='<span class="LC_error">' |
'database!</span>'; |
.&mt('WARNING: Cannot connect to database!') |
|
.'</span>'; |
&Apache::lonnet::logthis($error); |
&Apache::lonnet::logthis($error); |
return ($error,undef); |
return ($error,undef); |
} |
} |
if ($status == 0) { |
if ($status == 0) { |
# It would be nice to actually create the table.... |
# It would be nice to actually create the table.... |
$error ='<span class="LC_error">WARNING: The metadata table does not '. |
$error ='<span class="LC_error">' |
'exist in the LON-CAPA database.</span>'; |
.&mt('WARNING: The metadata table does not exist in the LON-CAPA database!') |
|
.'</span>'; |
&Apache::lonnet::logthis($error); |
&Apache::lonnet::logthis($error); |
return ($error,undef); |
return ($error,undef); |
} |
} |
Line 865 sub store_metadata {
|
Line 873 sub store_metadata {
|
\%metadata); |
\%metadata); |
} |
} |
if (defined($status) && $status ne '') { |
if (defined($status) && $status ne '') { |
$error='<span class="LC_error">Error occured saving new values in '. |
$error='<span class="LC_error">' |
'metadata table in LON-CAPA database</span>'; |
.&mt('Error occurred saving new values in metadata table in LON-CAPA database!') |
|
.'</span>'; |
&Apache::lonnet::logthis($error); |
&Apache::lonnet::logthis($error); |
&Apache::lonnet::logthis($status); |
&Apache::lonnet::logthis($status); |
return ($error,undef); |
return ($error,undef); |
Line 886 sub checkonthis {
|
Line 895 sub checkonthis {
|
'return_only_error_and_warning_counts' => 1)); |
'return_only_error_and_warning_counts' => 1)); |
my ($errorcount,$warningcount)=split(':',$result); |
my ($errorcount,$warningcount)=split(':',$result); |
if (($errorcount) || ($warningcount)) { |
if (($errorcount) || ($warningcount)) { |
$r->print('<br /><tt>'.$uri.'</tt>: '); |
$r->print('<h3>'.&mt('Warnings and Errors').'</h3>'); |
if ($errorcount) { |
$r->print('<tt>'.$uri.'</tt>:'); |
$r->print('<img src="/adm/lonMisc/bomb.gif" /><span class="LC_error"><b>'. |
$r->print('<ul>'); |
$errorcount.' '. |
if ($warningcount) { |
&mt('error(s)').'</b></span> '); |
$r->print('<li><div class="LC_warning">' |
} |
.&mt('[quant,_1,warning]',$warningcount) |
if ($warningcount) { |
.'</div></li>'); |
$r->print('<font color="blue">'. |
} |
$warningcount.' '. |
if ($errorcount) { |
&mt('warning(s)').'</font>'); |
$r->print('<li><div class="LC_error">' |
} |
.&mt('[quant,_1,error]',$errorcount) |
|
.' <img src="/adm/lonMisc/bomb.gif" />' |
|
.'</div></li>'); |
|
} |
|
$r->print('</ul>'); |
} else { |
} else { |
#$r->print('<font color="green">'.&mt('ok').'</font>'); |
#$r->print('<font color="green">'.&mt('ok').'</font>'); |
} |
} |
Line 935 backup copies, performs any automatic pr
|
Line 948 backup copies, performs any automatic pr
|
especially for rat and ssi files), |
especially for rat and ssi files), |
|
|
Returns a 2 element array, the first is the string to be shown to the |
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) |
(no error occurred) |
|
|
I<Additional documentation needed.> |
I<Additional documentation needed.> |
Line 978 sub publish {
|
Line 991 sub publish {
|
if ($error) { return ($outstring,$error); } |
if ($error) { return ($outstring,$error); } |
# ------------------------------------------------------------ Construct Allows |
# ------------------------------------------------------------ Construct Allows |
|
|
$scrout.='<h3>'.&mt('Dependencies').'</h3>'; |
my $outdep=''; # Collect dependencies output data |
my $allowstr=''; |
my $allowstr=''; |
foreach my $thisdep (sort(keys(%allow))) { |
foreach my $thisdep (sort(keys(%allow))) { |
if ($thisdep !~ /[^\s]/) { next; } |
if ($thisdep !~ /[^\s]/) { next; } |
if ($thisdep =~/\$/) { |
if ($thisdep =~/\$/) { |
$scrout.='<br /><span class="LC_warning">' |
$outdep.='<div class="LC_warning">' |
.&mt('The resource depends on another resource with variable filename, i.e., [_1].','<tt>'.$thisdep.'</tt>').'<br />' |
.&mt('The resource depends on another resource with variable filename, i.e., [_1].','<tt>'.$thisdep.'</tt>').'<br />' |
.&mt('You likely need to explicitly allow access to all possible dependencies using the [_1]-tag.','<tt><allow></tt>') |
.&mt('You likely need to explicitly allow access to all possible dependencies using the [_1]-tag.','<tt><allow></tt>') |
.'</span><br />'; |
."</div>\n"; |
} |
} |
unless ($style eq 'rat') { |
unless ($style eq 'rat') { |
$allowstr.="\n".'<allow src="'.$thisdep.'" />'; |
$allowstr.="\n".'<allow src="'.$thisdep.'" />'; |
} |
} |
$scrout.='<br />'; |
$outdep.='<div>'; |
if ($thisdep!~/[\*\$]/ && $thisdep!~m|^/adm/|) { |
if ($thisdep!~/[\*\$]/ && $thisdep!~m|^/adm/|) { |
$scrout.='<a href="'.$thisdep.'">'; |
$outdep.='<a href="'.$thisdep.'">'; |
} |
} |
$scrout.='<tt>'.$thisdep.'</tt>'; |
$outdep.='<tt>'.$thisdep.'</tt>'; |
if ($thisdep!~/[\*\$]/ && $thisdep!~m|^/adm/|) { |
if ($thisdep!~/[\*\$]/ && $thisdep!~m|^/adm/|) { |
$scrout.='</a>'; |
$outdep.='</a>'; |
if ( |
if ( |
&Apache::lonnet::getfile($Apache::lonnet::perlvar{'lonDocRoot'}.'/'. |
&Apache::lonnet::getfile($Apache::lonnet::perlvar{'lonDocRoot'}.'/'. |
$thisdep.'.meta') eq '-1') { |
$thisdep.'.meta') eq '-1') { |
$scrout.= ' - <span class="LC_error">'.&mt('Currently not available'). |
$outdep.= ' - <span class="LC_error">'.&mt('Currently not available'). |
'</span>'; |
'</span>'; |
} else { |
} else { |
my %temphash=(&Apache::lonnet::declutter($target).'___'. |
my %temphash=(&Apache::lonnet::declutter($target).'___'. |
Line 1014 sub publish {
|
Line 1027 sub publish {
|
} |
} |
} |
} |
} |
} |
|
$outdep.='</div><br />'; |
|
} |
|
|
|
if ($outdep) { |
|
$scrout.='<h3>'.&mt('Dependencies').'</h3>' |
|
.$outdep |
} |
} |
$outstring=~s/\n*(\<\/[^\>]+\>[^<]*)$/$allowstr\n$1\n/s; |
$outstring=~s/\n*(\<\/[^\>]+\>[^<]*)$/$allowstr\n$1\n/s; |
|
|
Line 1167 sub publish {
|
Line 1186 sub publish {
|
$textonly=~s/\<script[^\<]+\<\/script\>//g; |
$textonly=~s/\<script[^\<]+\<\/script\>//g; |
$textonly=~s/\<m\>[^\<]+\<\/m\>//g; |
$textonly=~s/\<m\>[^\<]+\<\/m\>//g; |
$textonly=~s/\<[^\>]*\>//g; |
$textonly=~s/\<[^\>]*\>//g; |
$textonly=~tr/A-Z/a-z/; |
|
$textonly=~s/[\$\&][a-z]\w*//g; |
|
$textonly=~s/[^a-z\s]//g; |
|
|
|
foreach ($textonly=~m/(\w+)/g) { |
|
unless ($nokey{$_}) { |
|
$keywords{$_}=1; |
|
} |
|
} |
|
} |
|
|
|
|
#this is a work simplification for german authors for present |
|
$textonly=HTML::Entities::decode($textonly); #decode HTML-character |
|
$textonly=Encode::Encoder::encode('utf8', $textonly); #encode to perl internal unicode |
|
$textonly=~tr/A-ZÜÄÖ/a-züäö/; #add lowercase rule for german "Umlaute" |
|
$textonly=~s/[\$\&][a-z]\w*//g; |
|
$textonly=~s/[^a-z^ü^ä^ö^ß\s]//g; #dont delete german "Umlaute" |
|
|
|
foreach ($textonly=~m/[^\s]+/g) { #match all but whitespaces |
|
unless ($nokey{$_}) { |
|
$keywords{$_}=1; |
|
} |
|
} |
|
|
|
|
|
} |
|
|
foreach my $addkey (split(/[\"\'\,\;]/,$metadatafields{'keywords'})) { |
foreach my $addkey (split(/[\"\'\,\;]/,$metadatafields{'keywords'})) { |
$addkey=~s/\s+/ /g; |
$addkey=~s/\s+/ /g; |
Line 1198 sub publish {
|
Line 1222 sub publish {
|
my $intr_scrout.='<br />' |
my $intr_scrout.='<br />' |
.'<form name="pubform" action="/adm/publish" method="post">'; |
.'<form name="pubform" action="/adm/publish" method="post">'; |
unless ($env{'form.makeobsolete'}) { |
unless ($env{'form.makeobsolete'}) { |
$intr_scrout.='<p>' |
$intr_scrout.='<p class="LC_warning">' |
.&mt('Searching for your resource will be based on the following metadata. Please provide as much data as possible.') |
.&mt('Searching for your resource will be based on the following metadata. Please provide as much data as possible.') |
.'</p>' |
.'</p>' |
.'<p><input type="submit" value="' |
.'<p><input type="submit" value="' |
Line 1237 END
|
Line 1261 END
|
.'<input type="button" value="'.&mt('check all').'" onclick="javascript:checkAll(document.pubform.keywords)" />' |
.'<input type="button" value="'.&mt('check all').'" onclick="javascript:checkAll(document.pubform.keywords)" />' |
.'<input type="button" value="'.&mt('uncheck all').'" onclick="javascript:uncheckAll(document.pubform.keywords)" />' |
.'<input type="button" value="'.&mt('uncheck all').'" onclick="javascript:uncheckAll(document.pubform.keywords)" />' |
.'</p><br />' |
.'</p><br />' |
.'<table border="2"><tr>'; |
.&Apache::loncommon::start_data_table(); |
|
my $cols_per_row = 10; |
my $colcount=0; |
my $colcount=0; |
|
my $wordcount=0; |
|
my $numkeywords = scalar(keys(%keywords)); |
|
|
foreach (sort keys %keywords) { |
foreach my $word (sort(keys(%keywords))) { |
$keywordout.='<td><label><input type="checkbox" name="keywords" value="'.$_.'"'; |
if ($colcount == 0) { |
if ($metadatafields{'keywords'}) { |
$keywordout .= &Apache::loncommon::start_data_table_row(); |
if ($metadatafields{'keywords'}=~/\Q$_\E/) { |
} |
$keywordout.=' checked="on"'; |
$colcount++; |
$env{'form.keywords'}.=$_.','; |
$wordcount++; |
} |
if (($wordcount == $numkeywords) && ($colcount < $cols_per_row)) { |
} elsif (&Apache::loncommon::keyword($_)) { |
my $colspan = 1+$cols_per_row-$colcount; |
$keywordout.=' checked="on"'; |
$keywordout .= '<td colspan="'.$colspan.'">'; |
$env{'form.keywords'}.=$_.','; |
} else { |
} |
$keywordout .= '<td>'; |
$keywordout.=' />'.$_.'</label></td>'; |
} |
if ($colcount>10) { |
$keywordout.='<label><input type="checkbox" name="keywords" value="'.$word.'"'; |
$keywordout.="</tr><tr>\n"; |
if ($metadatafields{'keywords'}) { |
$colcount=0; |
if ($metadatafields{'keywords'}=~/\Q$word\E/) { |
} |
$keywordout.=' checked="on"'; |
$colcount++; |
$env{'form.keywords'}.=$word.','; |
|
} |
|
} elsif (&Apache::loncommon::keyword($word)) { |
|
$keywordout.=' checked="on"'; |
|
$env{'form.keywords'}.=$word.','; |
|
} |
|
$keywordout.=' />'.$word.'</label></td>'; |
|
if ($colcount == $cols_per_row) { |
|
$keywordout.=&Apache::loncommon::end_data_table_row(); |
|
$colcount=0; |
|
} |
|
} |
|
if ($colcount > 0) { |
|
$keywordout .= &Apache::loncommon::end_data_table_row(); |
} |
} |
|
|
$env{'form.keywords'}=~s/\,$//; |
$env{'form.keywords'}=~s/\,$//; |
|
|
$keywordout.='</tr></table>' |
$keywordout.=&Apache::loncommon::end_data_table_row() |
|
.&Apache::loncommon::end_data_table() |
.&Apache::lonhtmlcommon::row_closure(); |
.&Apache::lonhtmlcommon::row_closure(); |
|
|
$intr_scrout.=$keywordout; |
$intr_scrout.=$keywordout; |
Line 1309 END
|
Line 1351 END
|
|
|
$intr_scrout.=&hiddenfield('lastrevisiondate',time); |
$intr_scrout.=&hiddenfield('lastrevisiondate',time); |
|
|
|
my $pubowner_last; |
|
if ($style eq 'prv') { |
|
$pubowner_last = 1; |
|
} |
$intr_scrout.=&textfield('Publisher/Owner','owner', |
$intr_scrout.=&textfield('Publisher/Owner','owner', |
$metadatafields{'owner'}); |
$metadatafields{'owner'},$pubowner_last); |
|
|
# ---------------------------------------------- Retrofix for unused copyright |
# ---------------------------------------------- Retrofix for unused copyright |
if ($metadatafields{'copyright'} eq 'free') { |
if ($metadatafields{'copyright'} eq 'free') { |
Line 1362 END
|
Line 1407 END
|
.&Apache::lonhtmlcommon::row_closure(1); |
.&Apache::lonhtmlcommon::row_closure(1); |
$intr_scrout.=&text_with_browse_field('Suggested Replacement for Obsolete File', |
$intr_scrout.=&text_with_browse_field('Suggested Replacement for Obsolete File', |
'obsoletereplacement', |
'obsoletereplacement', |
$metadatafields{'obsoletereplacement'}); |
$metadatafields{'obsoletereplacement'},'',1); |
} else { |
} else { |
$intr_scrout.=&hiddenfield('copyright','private'); |
$intr_scrout.=&hiddenfield('copyright','private'); |
} |
} |
Line 1388 END
|
Line 1433 END
|
&hiddenfield('obsolete',1). |
&hiddenfield('obsolete',1). |
&text_with_browse_field('Suggested Replacement for Obsolete File', |
&text_with_browse_field('Suggested Replacement for Obsolete File', |
'obsoletereplacement', |
'obsoletereplacement', |
$metadatafields{'obsoletereplacement'}); |
$metadatafields{'obsoletereplacement'},'',1); |
} |
} |
if (!$batch) { |
if (!$batch) { |
$scrout.=$intr_scrout |
$scrout.=$intr_scrout |
Line 1595 sub phasetwo {
|
Line 1640 sub phasetwo {
|
my $srcf=$2; |
my $srcf=$2; |
my $srct=$3; |
my $srct=$3; |
my $srcd=$1; |
my $srcd=$1; |
unless ($srcd=~/^\/home\/httpd\/html\/res/) { |
my $docroot = $Apache::lonnet::perlvar{'lonDocRoot'}; |
|
unless ($srcd=~/^\Q$docroot\E\/res/) { |
print $logfile "\nPANIC: Target dir is ".$srcd; |
print $logfile "\nPANIC: Target dir is ".$srcd; |
$r->print( |
$r->print( |
"<span class=\"LC_error\">".&mt('Invalid target directory, FAIL')."</span>"); |
"<span class=\"LC_error\">".&mt('Invalid target directory, FAIL')."</span>"); |
Line 1607 sub phasetwo {
|
Line 1653 sub phasetwo {
|
unlink($srcd.'/'.$filename); |
unlink($srcd.'/'.$filename); |
unlink($srcd.'/'.$filename.'.meta'); |
unlink($srcd.'/'.$filename.'.meta'); |
} else { |
} else { |
if ($filename=~/\Q$srcf\E\.(\d+)\.\Q$srct\E$/) { |
if ($filename=~/^\Q$srcf\E\.(\d+)\.\Q$srct\E$/) { |
$maxversion=($1>$maxversion)?$1:$maxversion; |
$maxversion=($1>$maxversion)?$1:$maxversion; |
} |
} |
} |
} |
Line 1696 sub phasetwo {
|
Line 1742 sub phasetwo {
|
# ------------------------------------------------------------- Trigger updates |
# ------------------------------------------------------------- Trigger updates |
push(@{$modified_urls},[$target,$source]); |
push(@{$modified_urls},[$target,$source]); |
unless ($registered_cleanup) { |
unless ($registered_cleanup) { |
$r->register_cleanup(\¬ify); |
my $handlers = $r->get_handlers('PerlCleanupHandler'); |
|
$r->set_handlers('PerlCleanupHandler' => [\¬ify,@{$handlers}]); |
$registered_cleanup=1; |
$registered_cleanup=1; |
} |
} |
|
|
Line 2148 ENDCAPTION
|
Line 2195 ENDCAPTION
|
|
|
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Target')) |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Target')) |
.'<tt>'.$thisdistarget.'</tt>' |
.'<tt>'.$thisdistarget.'</tt>' |
.&Apache::lonhtmlcommon::row_closure() |
|
); |
); |
|
|
# SB - ToDo: |
|
if (($cuname ne $env{'user.name'})||($cudom ne $env{'user.domain'})) { |
if (($cuname ne $env{'user.name'})||($cudom ne $env{'user.domain'})) { |
# $r->print(&Apache::lonhtmlcommon::row_title('<span class="LC_warning">'.&mt('Co-Author').'</span>') |
$r->print(&Apache::lonhtmlcommon::row_closure() |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Co-Author')) |
.&Apache::lonhtmlcommon::row_title(&mt('Co-Author')) |
.'<span class="LC_warning">' |
.'<span class="LC_warning">' |
.&mt('[_1] at [_2]',$cuname,$cudom) |
.&mt('[_1] at [_2]',$cuname,$cudom) |
.'</span>' |
.'</span>' |
.&Apache::lonhtmlcommon::row_closure() |
|
); |
); |
} |
} |
|
|
if (&Apache::loncommon::fileembstyle($thistype) eq 'ssi') { |
if (&Apache::loncommon::fileembstyle($thistype) eq 'ssi') { |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Diffs'))); |
$r->print(&Apache::lonhtmlcommon::row_closure() |
|
.&Apache::lonhtmlcommon::row_title(&mt('Diffs'))); |
$r->print(<<ENDDIFF); |
$r->print(<<ENDDIFF); |
<a href='javascript:void(window.open("/adm/diff?filename=/~$cuname/$thisdisfn&versiontwo=priv","cat","height=300,width=500,scrollbars=1,resizable=1,menubar=0,location=1"))'> |
<a href='javascript:void(window.open("/adm/diff?filename=/~$cuname/$thisdisfn&versiontwo=priv","cat","height=300,width=500,scrollbars=1,resizable=1,menubar=0,location=1"))'> |
ENDDIFF |
ENDDIFF |
$r->print(&mt('Diffs with Current Version').'</a>' |
$r->print(&mt('Diffs with Current Version').'</a>'); |
.&Apache::lonhtmlcommon::row_closure() |
|
); |
|
|
|
} |
} |
|
|
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
$r->print(&Apache::lonhtmlcommon::row_closure(1) |
|
.&Apache::lonhtmlcommon::end_pick_box() |
|
); |
|
|
# ------------------ Publishing from $thisfn to $thistarget with $thisembstyle. |
# ------------------ Publishing from $thisfn to $thistarget with $thisembstyle. |
|
|
Line 2186 ENDDIFF
|
Line 2229 ENDDIFF
|
unless ($errorcount) { |
unless ($errorcount) { |
my ($outstring,$error)= |
my ($outstring,$error)= |
&publish($thisfn,$thistarget,$thisembstyle); |
&publish($thisfn,$thistarget,$thisembstyle); |
$r->print('<hr />'.$outstring); |
$r->print($outstring); |
} else { |
} else { |
$r->print('<h3 class="LC_error">'. |
$r->print('<h3 class="LC_error">'. |
&mt('The document contains errors and cannot be published.'). |
&mt('The document contains errors and cannot be published.'). |