# TRASH FORM TESTER TRASH # # # The LearningOnline Network with CAPA # TeX Content Handler # # 05/29/00,05/30 Gerd Kortemeyer package Apache::lonftest; use strict; use Apache::Constants qw(:common); # ================================================================ Main Handler sub handler { my $r=shift; # ----------------------------------------------------------- Set document type $r->content_type('text/html'); $r->send_http_header; return OK if $r->header_only; # -------------------------------------------------------------------- This URL my $thisurl=$r->uri; # --------------------------------------------------------------- Render Output $r->print(<

Form Test

ENDSTART # ---------------------------------------------------------------- Hash Restore $r->print("

Random Seed

".&Apache::lonnet::rndseed()); $r->print("

Restored Hash

"); my %hash=&Apache::lonnet::restore(); map { $r->print($_.' : '.$hash{$_}.'
'); } sort keys %hash; # ------------------------------------------------------------------------ form $r->print(<Form
ENDFORM if ($ENV{'form.store'}) { $r->print('

New Data

'); $r->print("top: $ENV{'form.top'}
bottom: $ENV{'form.bottom'}
"); $r->print('

Storing: '. &Apache::lonnet::store('top' => $ENV{'form.top'}, 'bottom' => $ENV{'form.bottom'})); } $r->print(''); return OK; } 1; __END__