--- loncom/publisher/lonpublisher.pm 2009/03/26 11:27:26 1.254 +++ loncom/publisher/lonpublisher.pm 2009/08/14 12:26:08 1.258.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.254 2009/03/26 11:27:26 bisitz Exp $ +# $Id: lonpublisher.pm,v 1.258.2.2 2009/08/14 12:26:08 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -384,11 +384,11 @@ sub selectbox { my $selout="\n".&Apache::lonhtmlcommon::row_title($title) .''.&Apache::lonhtmlcommon::row_closure(); return $selout; @@ -1166,15 +1166,16 @@ sub publish { } } if ($chparms) { - $scrout.='
'.&mt('Obsolete parameters or saved values').': '. - $chparms.'
'. - &mt('If this resource is in active use, student performance data from the previous version may become inaccessible.').'
'.&mt('Obsolete parameters or saved values').': ' + .$chparms.'
' + .''.&mt('Warning!').'
'
+ .&mt('If this resource is in active use, student performance data from the previous version may become inaccessible.')
+ .'
'. - &mt('Copyright/distribution option "Private" is no longer supported. Select another option from below. Consider "Custom Rights" for maximum control over the usage of your resource.').'
'.&mt('Warning!').'
'
+ .&mt('Copyright/distribution option "Private" is no longer supported. Select another option from below. Consider "Custom Rights" for maximum control over the usage of your resource.')
+ .'
'.&mt('Created directory').' '.$parts[$count].'
'); mkdir($path,0777); + $r->print('' + .&mt('Created directory [_1]' + ,''.$parts[$count].'') + .'
' + ); } } @@ -1752,27 +1758,29 @@ sub phasetwo { &Apache::lonnet::devalidate_cache_new('meta', &Apache::lonnet::declutter($thisdistarget)); +# ------------------------------------------------------------- Everything done + $logfile->close(); + $r->print(''.&mt('Done').'
'); + # ------------------------------------------------ Provide link to new resource unless ($batch) { - my $thissrc=$source; $thissrc=~s{^/home/($match_username)/public_html}{/priv/$1}; my $thissrcdir=$thissrc; $thissrcdir=~s/\/[^\/]+$/\//; - - $r->print( - ''.
+ unless ($env{'request.role'} =~ /^aa/) {
+ $r->print(
+ ' '.
+ ' '.
&mt('Back to Source Directory').' '.&mt('Done').' '.&mt('Created directory').' '.$parts[$count].' '
+ .&mt('Created directory [_1]'
+ ,''.$parts[$count].'')
+ .'
'.
+ &mt('View Published Version').'');
+ }
+ $r->print(''.
- ''.&mt('Directory').' '.$thisdisfn.'
'.
- &mt('Target').': '.$resdir.'
');
+ $r->print(&Apache::lonhtmlcommon::start_pick_box()
+ .&Apache::lonhtmlcommon::row_title(&mt('Directory'))
+ .''.$thisdisfn.''
+ .&Apache::lonhtmlcommon::row_closure()
+ .&Apache::lonhtmlcommon::row_title(&mt('Target'))
+ .''.$resdir.''
+ );
my $dirptr=16384; # Mask indicating a directory in stat.cmode.
unless ($env{'form.phase'} eq 'two') {
# ask user what they want
+ $r->print(&Apache::lonhtmlcommon::row_closure()
+ .&Apache::lonhtmlcommon::row_title(&mt('Options'))
+ );
$r->print('');
+ $r->print(&Apache::lonhtmlcommon::row_closure(1)
+ .&Apache::lonhtmlcommon::end_pick_box()
+ );
$lock=0;
} else {
+ $r->print(&Apache::lonhtmlcommon::row_closure(1)
+ .&Apache::lonhtmlcommon::end_pick_box()
+ );
unless ($lock) { $lock=&Apache::lonnet::set_lock(&mt('Publishing [_1]',$fn)); }
# actually publish things
opendir(DIR,$fn);
@@ -1965,8 +1987,12 @@ sub defaultmetapublish {
for ($count=5;$count<$#parts;$count++) {
$path.="/$parts[$count]";
if ((-e $path)!=1) {
- $r->print('