--- rat/lonratedt.pm 2005/06/09 21:40:37 1.72 +++ 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.72 2005/06/09 21:40:37 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 } @@ -689,6 +695,14 @@ function idxopen(mode) { idx.focus(); } +// ------------------------------------------------------ Open groupsort window +function groupopen(url,recover) { + var options="scrollbars=1,resizable=1,menubar=0"; + idxflag=1; + idx=open("/adm/groupsort?mode=$mode&recover="+recover+"&readfile="+url,"idxout",options); + idx.focus(); +} + // --------------------------------------------------------- Open search window function srchopen(mode) { var options="scrollbars=1,resizable=1,menubar=0"; @@ -705,6 +719,7 @@ function groupsearch() { function groupimport() { idxcheck('groupimport'); } + // ------------------------------------------------------- Do srch status check function srchcheck(mode) { if (!srch || srch.closed || srchmode!=mode) { @@ -1013,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', @@ -1035,11 +1048,10 @@ sub smpedt { 'cs' => 'Cut selected', 'ps' => 'Copy selected', '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
@@ -1114,6 +1135,8 @@ value="Select Map"> + $lt{'as'}
@@ -1148,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) { @@ -1223,7 +1244,7 @@ sub viewmap { } } $r->print(''); - $r->print(''); + $r->print(&Apache::loncommon::end_page()); } # ================================================================ Main Handler