--- rat/lonratedt.pm 2005/06/10 21:45:46 1.74 +++ rat/lonratedt.pm 2006/04/11 19:35:16 1.75 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Edit Handler for RAT Maps # -# $Id: lonratedt.pm,v 1.74 2005/06/10 21:45:46 www Exp $ +# $Id: lonratedt.pm,v 1.75 2006/04/11 19:35:16 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -405,25 +405,31 @@ sub attemptread { # --------------------------------------------------------- Build up RAT screen sub ratedt { my ($r,$url)=@_; - my $frameset = ''; - if ($env{'environment.remote'} eq 'off') { - $frameset = ''; + my %layout = ('border' => "0"); + if ($env{'environment.remote'} eq 'off') { + $layout{'rows'} = "1,250,*"; + } else { + $layout{'rows'} = "1,70,*"; } - $r->print(< - - - -$frameset - - - - - +'; + + my $start_page = + &Apache::loncommon::start_page('Edit Sequence',$js, + {'frameset' => 1, + 'add_entries' => \%layout}); + my $end_page = + &Apache::loncommon::end_page({'frameset' => 1}); + $r->print(< + + +$end_page ENDDOCUMENT } @@ -1022,9 +1028,7 @@ sub smpedt { # ----------------------------------------------------- Start simple RAT screen my $editscript=&editscript('simple'); - my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef, - ($env{'environment.remote'} ne 'off')). - &Apache::loncommon::help_open_menu('','Sequence_Simple_Editor_Creation','Sequence_Simple_Editor_Creation','',6,'RAT'); + my %lt=&Apache::lonlocal::texthash( 'sa' => 'Save', 'nt' => 'New Title', @@ -1046,10 +1050,8 @@ sub smpedt { 'pas' => 'Paste after selected', 'reco' => 'Recover Deleted' ); - $r->print(< - - - -$bodytag +ENDJS + + my $start_page = + &Apache::loncommon::start_page(undef,$js, + {'only_body' => + ($env{'environment.remote'} ne 'off')}). + &Apache::loncommon::help_open_menu('','Sequence_Simple_Editor_Creation','Sequence_Simple_Editor_Creation','',6,'RAT'); + my $end_page = &Apache::loncommon::end_page(); + + $r->print(<$errtext
@@ -1160,29 +1171,27 @@ $targetwindow
- +$end_page ENDSMPHEAD } # ----------------------------------------------------------------- No such dir sub nodir { my ($r,$dir)=@_; - $dir=~s/^\/home\/\w+\/public\_html//; - $r->print(< - -

No such directory: $dir

- - -ENDNODIR + $dir=~s{^/home/\w+/public_html}{}; + $r->print(&Apache::loncommon::start_page(undef,undef, + {'only_body' => 1, + 'bgcolor' => '#FFFFFF',}). + "

No such directory: $dir

". + &Apache::loncommon::end_page()); } # ---------------------------------------------------------------- View Handler sub viewmap { my ($r,$url,$adv,$errtext)=@_; - $r->print(''. - &Apache::loncommon::bodytag('Edit Content of a Map'). + $r->print( + &Apache::loncommon::start_page('Edit Content of a Map'). &Apache::loncommon::help_open_menu('','','','',6,'RAT'). &buttons($adv)); if ($errtext) { @@ -1235,7 +1244,7 @@ sub viewmap { } } $r->print(''); - $r->print(''); + $r->print(&Apache::loncommon::end_page()); } # ================================================================ Main Handler