--- loncom/interface/lonindexer.pm 2006/03/06 18:23:10 1.140 +++ loncom/interface/lonindexer.pm 2006/03/16 22:42:58 1.141 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.140 2006/03/06 18:23:10 www Exp $ +# $Id: lonindexer.pm,v 1.141 2006/03/16 22:42:58 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -116,7 +116,7 @@ sub handler { my $closebutton=''; my $groupimportbutton=''; my $colspan=''; - + $extrafield=''; my $diropendb = "/home/httpd/perl/tmp/$env{'user.domain'}_$env{'user.name'}_indexer.db"; @@ -133,7 +133,7 @@ sub handler { { if ($env{'form.launch'} eq '1') { &start_fresh_session(); - } + } #Hijack lonindexer to verify a title and be close down. if ($env{'form.launch'} eq '2') { &Apache::loncommon::content_type($r,'text/html'); @@ -145,11 +145,7 @@ sub handler { $verify_title=~s/'/\\'/g; $extra='window.opener.document.forms["'.$env{'form.form'}.'"].elements["'.$env{'form.titleelement'}.'"].value=\''.$verify_title.'\';'; } - my $html=&Apache::lonxml::xmlbegin(); - $r->print(< - + my $js = < function load() { window.opener.document.forms["$env{'form.form'}"] @@ -159,11 +155,12 @@ sub handler { window.close(); } - - - - ENDSUBM + $r->print(&Apache::loncommon::start_page(undef,$js, + {'only_body' =>1, + 'add_entries' => + 'onLoad="load();"',}). + &Apache::loncommon::end_page()); return OK; } @@ -347,14 +344,7 @@ END } # ---------------------------------------------------------------- Print Header - my $html=&Apache::lonxml::xmlbegin(); - $r->print(< -The LearningOnline Network With CAPA Directory Browser - - - + my $js = <<"ENDHEADER"; - - ENDHEADER -my ($headerdom)=($uri=~/^\/res\/(\w+)\//); -$r->print(&Apache::loncommon::bodytag('Browse Resources',undef,undef,undef, - $headerdom)); + + my ($headerdom)=($uri=~/^\/res\/(\w+)\//); + $r->print(&Apache::loncommon::start_page('Browse Resources',$js, + {'domain' => $headerdom,})); # - Evaluate actions from previous page (both cumulatively and chronologically) if ($env{'form.catalogmode'} eq 'groupimport') { my $acts=$env{'form.acts'}; @@ -598,7 +587,7 @@ END $r->print(''); # --------------------------------------------------- end the output and return - $r->print(''."\n"); + $r->print(&Apache::loncommon::end_page()."\n"); } if(! $c->aborted()) { # write back into the temporary file @@ -721,9 +710,12 @@ sub dynmetaread { } sub initdebug { - my $html=&Apache::lonxml::xmlbegin(); + my $start_page= + &Apache::loncommon::start_page('Debug',undef, + {'only_body' => 1,}); + $start_page =~ s/\n/ /g; return < + ENDJS } sub writedebug { - my $text = shift; - return ""; + my ($text) = @_; + return ""; } # -------------------- filters out files based on extensions (returns an array)