version 1.278, 2012/01/29 03:08:32
|
version 1.284, 2013/07/18 16:28:50
|
Line 121 use HTML::LCParser;
|
Line 121 use HTML::LCParser;
|
use HTML::Entities; |
use HTML::Entities; |
use Encode::Encoder; |
use Encode::Encoder; |
use Apache::lonxml; |
use Apache::lonxml; |
use Apache::loncacc; |
|
use DBI; |
use DBI; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon(); |
use Apache::loncommon(); |
Line 1017 sub publish {
|
Line 1016 sub publish {
|
$outdep.= ' - <span class="LC_error">'.&mt('Currently not available'). |
$outdep.= ' - <span class="LC_error">'.&mt('Currently not available'). |
'</span>'; |
'</span>'; |
} else { |
} else { |
|
# |
|
# Store the fact that the dependency has been used by the target file |
|
# Unfortunately, usage is erroneously named sequsage in lonmeta.pm |
|
# The translation happens in lonmetadata.pm |
|
# |
my %temphash=(&Apache::lonnet::declutter($target).'___'. |
my %temphash=(&Apache::lonnet::declutter($target).'___'. |
&Apache::lonnet::declutter($thisdep).'___usage' |
&Apache::lonnet::declutter($thisdep).'___usage' |
=> time); |
=> time); |
Line 1770 sub phasetwo {
|
Line 1774 sub phasetwo {
|
my $thissrcdir=$thissrc; |
my $thissrcdir=$thissrc; |
$thissrcdir=~s/\/[^\/]+$/\//; |
$thissrcdir=~s/\/[^\/]+$/\//; |
|
|
$r->print(&Apache::loncommon::head_subbox( |
$r->print( |
&Apache::lonhtmlcommon::start_funclist(). |
&Apache::lonhtmlcommon::actionbox([ |
&Apache::lonhtmlcommon::add_item_funclist( |
|
'<a href="'.$thisdistarget.'">'. |
'<a href="'.$thisdistarget.'">'. |
&mt('View Published Version'). |
&mt('View Published Version'). |
'</a>'). |
'</a>', |
&Apache::lonhtmlcommon::add_item_funclist( |
|
'<a href="'.$thissrc.'">'. |
'<a href="'.$thissrc.'">'. |
&mt('Back to Source'). |
&mt('Back to Source'). |
'</a>'). |
'</a>', |
&Apache::lonhtmlcommon::add_item_funclist( |
|
'<a href="'.$thissrcdir.'">'. |
'<a href="'.$thissrcdir.'">'. |
&mt('Back to Source Directory'). |
&mt('Back to Source Directory'). |
'</a>'). |
'</a>']) |
&Apache::lonhtmlcommon::end_funclist()) |
|
); |
); |
} |
} |
return 1; |
return 1; |
Line 1895 sub publishdirectory {
|
Line 1895 sub publishdirectory {
|
$r->print(&Apache::lonhtmlcommon::row_closure() |
$r->print(&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_title(&mt('Options')) |
.&Apache::lonhtmlcommon::row_title(&mt('Options')) |
); |
); |
$r->print('<form name="pubdirpref" method="post">'. |
$r->print('<form name="pubdirpref" method="post" action="">'. |
&hiddenfield('phase','two'). |
&hiddenfield('phase','two'). |
&hiddenfield('filename',$env{'form.filename'}). |
&hiddenfield('filename',$env{'form.filename'}). |
&checkbox('pubrec','include subdirectories'). |
&checkbox('pubrec','include subdirectories'). |
Line 2014 sub defaultmetapublish {
|
Line 2014 sub defaultmetapublish {
|
$r->print($reply.'</p><br />');$r->rflush; |
$r->print($reply.'</p><br />');$r->rflush; |
} |
} |
# ------------------------------------------------------------------- Link back |
# ------------------------------------------------------------------- Link back |
$r->print("<a href='".&Apache::lonnet::display($fn)."'>".&mt('Back to Metadata').'</a>'); |
$r->print("<a href='".&Apache::loncfile::display($fn)."'>".&mt('Back to Metadata').'</a>'); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} |
} |
Line 2078 sub handler {
|
Line 2078 sub handler {
|
# -------------------------------------------------------------- Check filename |
# -------------------------------------------------------------- Check filename |
|
|
my $fn=&unescape($env{'form.filename'}); |
my $fn=&unescape($env{'form.filename'}); |
($cuname,$cudom)=&Apache::loncacc::constructaccess($fn); |
($cuname,$cudom)=&Apache::lonnet::constructaccess($fn); |
# ----------------------------------------------------- Do we have permissions? |
# ----------------------------------------------------- Do we have permissions? |
unless (($cuname) && ($cudom)) { |
unless (($cuname) && ($cudom)) { |
$r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}. |
$r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}. |
Line 2143 sub handler {
|
Line 2143 sub handler {
|
# Breadcrumbs |
# Breadcrumbs |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::add_breadcrumb({ |
&Apache::lonhtmlcommon::add_breadcrumb({ |
'text' => 'Construction Space', |
'text' => 'Authoring Space', |
'href' => &Apache::loncommon::authorspace($fn), |
'href' => &Apache::loncommon::authorspace($fn), |
}); |
}); |
&Apache::lonhtmlcommon::add_breadcrumb({ |
&Apache::lonhtmlcommon::add_breadcrumb({ |
Line 2218 ENDCAPTION
|
Line 2218 ENDCAPTION
|
$r->print(&Apache::lonhtmlcommon::row_closure() |
$r->print(&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_title(&mt('Diffs'))); |
.&Apache::lonhtmlcommon::row_title(&mt('Diffs'))); |
$r->print(<<ENDDIFF); |
$r->print(<<ENDDIFF); |
<a href='javascript:void(window.open("/adm/diff?filename=$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=$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>'); |
} |
} |