File:
[LON-CAPA] /
rat /
Attic /
lonftest.pm
Revision
1.4:
download - view:
text,
annotated -
select for diffs
Tue Nov 14 18:39:34 2000 UTC (24 years ago) by
www
Branches:
MAIN
CVS tags:
version_1_2_X,
version_1_2_1,
version_1_2_0,
version_1_1_X,
version_1_1_99_5,
version_1_1_99_4,
version_1_1_99_3,
version_1_1_99_2,
version_1_1_99_1,
version_1_1_99_0,
version_1_1_3,
version_1_1_2,
version_1_1_1,
version_1_1_0,
version_1_0_99_3,
version_1_0_99_2,
version_1_0_99_1,
version_1_0_99,
version_1_0_3,
version_1_0_2,
version_1_0_1,
version_1_0_0,
version_0_99_5,
version_0_99_4,
version_0_99_3,
version_0_99_2,
version_0_99_1,
version_0_99_0,
version_0_6_2,
version_0_6,
version_0_5_1,
version_0_5,
version_0_4,
stable_2002_spring,
stable_2002_july,
stable_2002_april,
stable_2001_fall,
conference_2003,
STABLE,
HEAD
Tests parameters
# 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(<<ENDSTART);
<html>
<body bgcolor="#EEFFCC" test="#112233" link="#332211" vlink="#442222"
alink="#FF0000">
<h1>Form Test</h1>
ENDSTART
# ---------------------------------------------------------------- Hash Restore
$r->print("<h2>Random Seed</h2>".&Apache::lonnet::rndseed());
$r->print("<h2>Restored Hash</h2>");
my %hash=&Apache::lonnet::restore();
map {
$r->print($_.' : '.$hash{$_}.'<br>');
} sort keys %hash;
# ------------------------------------------------------------------------ form
$r->print(<<ENDFORM);
<h2>Form</h2>
<form action="$thisurl" method="post">
<input name="store" type=hidden value='yes'>
<input name="top" type=text size=20>
<input name="bottom" type=text size=20>
<input name="submit" type=submit value="Yeah!">
</form>
ENDFORM
if ($ENV{'form.store'}) {
$r->print('<h2>New Data</h2>');
$r->print("top: $ENV{'form.top'}<br>bottom: $ENV{'form.bottom'}<br>");
$r->print('<p>Storing: '.
&Apache::lonnet::store('top' => $ENV{'form.top'},
'bottom' => $ENV{'form.bottom'}));
}
$r->print("\n<br>".&Apache::lonnet::EXT('resource.fred'));
$r->print("\n<br>".&Apache::lonnet::EXT('resource.deadline.type'));
$r->print('</body></html>');
return OK;
}
1;
__END__
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>