version 1.88, 2005/07/14 21:31:34
|
version 1.91, 2006/05/17 13:41:45
|
Line 36 use Apache::Constants qw(:common :http :
|
Line 36 use Apache::Constants qw(:common :http :
|
use Apache::loncacc; |
use Apache::loncacc; |
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonhtmlcommon(); |
use Apache::lonhtmlcommon(); |
|
use Apache::londiff(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonmsg; |
use Apache::lonmsg; |
use Apache::lonmenu; |
use Apache::lonmenu; |
Line 137 sub handler {
|
Line 138 sub handler {
|
} |
} |
closedir(DIR); |
closedir(DIR); |
|
|
$r->print('</table></body></html>'); |
$r->print('</table>'.&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} |
} |
# |
# |
Line 191 sub startpage {
|
Line 192 sub startpage {
|
my $currdir = '/priv/'.$uname.$thisdisfn; |
my $currdir = '/priv/'.$uname.$thisdisfn; |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
my $html=&Apache::lonxml::xmlbegin(); |
|
$r->print($html.'<head><title>LON-CAPA Construction Space</title></head>'); |
|
|
|
my $pagetitle; |
|
my $formaction='/priv/'.$uname.$thisdisfn.'/'; |
my $formaction='/priv/'.$uname.$thisdisfn.'/'; |
$formaction=~s/\/+/\//g; |
$formaction=~s|/+|/|g; |
$pagetitle .= &Apache::loncommon::help_open_menu('','','','',3,'Authoring'). |
my $pagetitle .= &Apache::loncommon::help_open_menu('','','','',3,'Authoring'). |
'<font face="Arial, Helvetica, sans-serif" size="+1"><b>Construction Space</b>:</font> '. |
'<font face="Arial, Helvetica, sans-serif" size="+1"><b>Construction Space</b>:</font> '. |
'<form name="dirs" method="post" action="'.$formaction. |
'<form name="dirs" method="post" action="'.$formaction. |
'" target="_parent"><tt><b>'. |
'" target="_parent"><tt><b>'. |
Line 208 sub startpage {
|
Line 206 sub startpage {
|
&Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction); |
&Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction); |
if ($env{'environment.remote'} eq 'off') { |
if ($env{'environment.remote'} eq 'off') { |
$env{'request.noversionuri'}=$currdir.'/'; |
$env{'request.noversionuri'}=$currdir.'/'; |
$r->print(&Apache::loncommon::bodytag('Construction Space',undef,undef,undef,undef,undef,$pagetitle)); |
$r->print(&Apache::loncommon::start_page('Construction Space',undef, |
|
{'body_title' => |
|
$pagetitle,})); |
} else { |
} else { |
|
$r->print(&Apache::loncommon::start_page('Construction Space',undef)); |
$r->print($pagetitle); |
$r->print($pagetitle); |
} |
} |
|
|
my $pubdirscript=(<<ENDPUBDIRSCRIPT); |
my $pubdirscript=(<<ENDPUBDIRSCRIPT); |
<script type="text/javascript"> |
<script type="text/javascript"> |
top.document.title = '$thisdisfn/ - LON-CAPA Construction Space'; |
top.document.title = '$thisdisfn/ - LON-CAPA Construction Space'; |
Line 570 sub putresource {
|
Line 572 sub putresource {
|
# $uname.'/'.$thisdisfn.'/'.$filename.'">'. |
# $uname.'/'.$thisdisfn.'/'.$filename.'">'. |
# &mt('Delete').'</a>'; |
# &mt('Delete').'</a>'; |
if (-e $resdir.'/'.$filename) { |
if (-e $resdir.'/'.$filename) { |
|
my $same=0; |
my ($rdev,$rino,$rmode,$rnlink, |
my ($rdev,$rino,$rmode,$rnlink, |
$ruid,$rgid,$rrdev,$rsize, |
$ruid,$rgid,$rrdev,$rsize, |
$ratime,$rmtime,$rctime, |
$ratime,$rmtime,$rctime, |
$rblksize,$rblocks)=stat($resdir.'/'.$filename); |
$rblksize,$rblocks)=stat($resdir.'/'.$filename); |
|
if ($rmtime>=$cmtime) { |
|
$same=1; |
|
} else { |
|
if (&Apache::londiff::are_different_files($resdir.'/'.$filename, |
|
'/home/'.$uname.'/public_html/'.$thisdisfn.'/'.$filename)) { |
|
$same=0; |
|
} else { |
|
$same=1; |
|
} |
|
} |
$publish_button=&mt('Re-publish'); |
$publish_button=&mt('Re-publish'); |
if ($rmtime>=$cmtime) { |
if ($same) { |
$pubstatus = 'published'; |
$pubstatus = 'published'; |
$status=&mt('Published').'<br />'. |
$status=&mt('Published').'<br />'. |
&mt(&getCopyRightString($targetdir.'/'.$filename)).' '. |
&mt(&getCopyRightString($targetdir.'/'.$filename)).' '. |