--- loncom/publisher/lonpublisher.pm 2009/07/25 06:55:31 1.261 +++ loncom/publisher/lonpublisher.pm 2009/11/19 05:18:08 1.263 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.261 2009/07/25 06:55:31 raeburn Exp $ +# $Id: lonpublisher.pm,v 1.263 2009/11/19 05:18:08 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1747,7 +1747,8 @@ sub phasetwo { # ------------------------------------------------------------- Trigger updates push(@{$modified_urls},[$target,$source]); unless ($registered_cleanup) { - $r->register_cleanup(\¬ify); + my $handlers = $r->get_handlers('PerlCleanupHandler'); + $r->set_handlers('PerlCleanupHandler' => [\¬ify,@{$handlers}]); $registered_cleanup=1; } @@ -1770,15 +1771,26 @@ sub phasetwo { my $thissrcdir=$thissrc; $thissrcdir=~s/\/[^\/]+$/\//; - + $r->print(&Apache::lonhtmlcommon::start_funclist()); + unless ($env{'request.role'}=~/^(aa)/) { + $r->print( + &Apache::lonhtmlcommon::add_item_funclist( + '' + .&mt('View Published Version') + .'') + ); + } $r->print( - '
'. - &mt('View Published Version').''. - '

'. - &mt('Back to Source').'

'. - '

'. - &mt('Back to Source Directory').'

'); + &Apache::lonhtmlcommon::add_item_funclist( + '' + .&mt('Back to Source') + .'') + .&Apache::lonhtmlcommon::add_item_funclist( + '' + .&mt('Back to Source Directory') + .'') + .&Apache::lonhtmlcommon::end_funclist() + ); } return 1; } @@ -2283,7 +2295,6 @@ ENDDIFF } } else { &phasetwo($r,$thisfn,$thistarget,$thisembstyle,$thisdistarget); - $r->print('
'); } } $r->print(&Apache::loncommon::end_page());