File:  [LON-CAPA] / rat / lonwrapper.pm
Revision 1.3: download - view: text, annotated - select for diffs
Thu Jul 5 18:14:17 2001 UTC (22 years, 10 months ago) by www
Branches: MAIN
CVS tags: stable_2001_fall, HEAD
Works now except for page flip.

    1: # The LearningOnline Network with CAPA
    2: # Wrapper for external and binary files as standalone resources
    3: #
    4: # (Edit Handler for RAT Maps
    5: # (TeX Content Handler
    6: #
    7: # 05/29/00,05/30 Gerd Kortemeyer)
    8: # 7/1,6/30 Gerd Kortemeyer)
    9: #
   10: # 7/5 Gerd Kortemeyer
   11: 
   12: package Apache::lonwrapper;
   13: 
   14: use strict;
   15: use Apache::Constants qw(:common);
   16: use Apache::lonnet();
   17: use Apache::lonxml();
   18: 
   19: # ================================================================ Main Handler
   20: 
   21: sub handler {
   22:   my $r=shift;
   23:   $r->content_type('text/html');
   24:   $r->send_http_header;
   25: 
   26:   return OK if $r->header_only;
   27: 
   28:   my $url=$r->uri;
   29:   $url=~s/^\/adm\/wrapper//;
   30:   $url=~s/^\/ext\//http\:\/\//;
   31:   my $events='onLoad="'.&Apache::lonxml::loadevents.
   32:            '" onUnload="'.&Apache::lonxml::unloadevents.'"';
   33:   my $script=&Apache::lonxml::registerurl(1);
   34:   $r->print(<<ENDDOCUMENT);
   35: <html>
   36: <head>
   37: $script
   38: </head>
   39: <frameset rows="1,*" border=0 $events>
   40: <frame src="/adm/rat/empty.html">
   41: <frame src="$url">
   42: </frameset>
   43: </html>
   44: ENDDOCUMENT
   45:   return OK;
   46: }
   47: 
   48: 1;
   49: __END__
   50: 
   51: 
   52: 
   53: 
   54: 
   55: 
   56: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>