--- rat/lonratmenu.pm 2008/03/22 01:39:05 1.10 +++ rat/lonratmenu.pm 2016/02/05 17:46:08 1.21 @@ -2,7 +2,7 @@ # Build menu bar for Advanced RAT. Uses javascript code originally in # static file: rat/client/code.html, now in rat/client/ratcode.js # -# $Id: lonratmenu.pm,v 1.10 2008/03/22 01:39:05 raeburn Exp $ +# $Id: lonratmenu.pm,v 1.21 2016/02/05 17:46:08 damieng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,56 +32,123 @@ use strict; use Apache::Constants qw(:common); use Apache::File; use Apache::loncommon; +use Apache::lonhtmlcommon; +use Apache::lonlocal; use Apache::lonnet; sub handler { my $r = shift; my $include = $Apache::lonnet::perlvar{'lonIncludes'}; my $jsh=Apache::File->new($include."/ratcode.js"); - $r->send_http_header('text/html'); my $js = join('',<$jsh>); my %loaditem = ('onunload' => "leave();",); - my $start_page = - &Apache::loncommon::start_page('Advanced Editor',$js, - {'add_entries' => \%loaditem, 'suppress_header_logos' => 1}); - $r->print($start_page); + my $readfile=$r->uri; $readfile=~s/\/loadonly\/adveditmenu$//; - $r->print(&print_html($readfile)); - $r->print(&Apache::loncommon::end_page()); - return OK; -} -sub print_html { - my $readfile=shift; - my $help=&Apache::loncommon::help_open_menu('Sequence_Advanced_Editor_Creation','Sequence_Advanced_Editor_Creation',6,'RAT'); - - my $pagetext = <<"END"; -
-
|
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.