version 1.1, 2002/05/07 14:01:30
|
version 1.3, 2002/05/29 01:09:37
|
Line 36 package Apache::LONCAPA::ToTheGateway;
|
Line 36 package Apache::LONCAPA::ToTheGateway;
|
|
|
# ================================================================ DEPENDENCIES |
# ================================================================ DEPENDENCIES |
use strict; # enforce handling of variables, references and subroutines |
use strict; # enforce handling of variables, references and subroutines |
|
use Apache::Constants qw(:common); |
|
use Apache::LONCAPA::FromTheGateway; |
|
|
# ============================================================ MODULE VARIABLES |
# ============================================================ MODULE VARIABLES |
my $VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/); |
my $VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/); |
|
|
# ================================================================= SUBROUTINES |
# ================================================================= SUBROUTINES |
|
|
|
|
|
# ----------------------------- Handling routine called via Apache and mod_perl |
|
sub handler { |
|
my $r = shift; |
|
Apache::GATEWAY::Common::readCGI($r); |
|
my $output; |
|
if ($ENV{'form.verb'} eq 'search') { |
|
# NSDL->answer_metadata_record_request |
|
$output= |
|
Apache::LONCAPA::FromTheGateway::search_or_browse_against_NSDLgateway(\%ENV); |
|
} |
|
my $cgi; |
|
foreach my $key (keys %ENV) { |
|
if ($key=~/^form\./) { |
|
$cgi.="$key: $ENV{$key}\n"; |
|
} |
|
} |
|
$r->content_type('text/html'); |
|
$r->send_http_header; |
|
return(OK) if $r->header_only; |
|
$r->print(<<END); |
|
<html> |
|
<head><title>Test Output</title></head> |
|
<body> |
|
<h1>Apache::LONCAPA::ToTheGateway</h1> |
|
<h2>Input</h2> |
|
<pre> |
|
$cgi |
|
</pre> |
|
<h2>Output</h2> |
|
<pre> |
|
$output |
|
</pre> |
|
</body> |
|
</html> |
|
END |
|
return(OK); |
|
} |
|
|
# ---------------------------------------------- LONCAPA->answer_search_request |
# ---------------------------------------------- LONCAPA->answer_search_request |
sub answer_search_request { |
sub answer_search_request { |
# Not yet implemented |
# Not yet implemented |
Line 51 sub answer_search_request {
|
Line 90 sub answer_search_request {
|
|
|
# ------------------------------------- LONCAPA->answer_metadata_record_request |
# ------------------------------------- LONCAPA->answer_metadata_record_request |
sub answer_metadata_record_request { |
sub answer_metadata_record_request { |
# Not yet implemented |
my ($url)=@_; |
# Need to specifically characterize INPUT arguments and OUTPUT data |
return "will have multiplexed this and returned from LON-CAPA network\n"; |
} |
} |
|
|
# -------------------------------------------- LONCAPA->answer_resource_request |
# -------------------------------------------- LONCAPA->answer_resource_request |
Line 88 In terms of the overall data flow, the
|
Line 127 In terms of the overall data flow, the
|
'=====>' below indicates the role of this |
'=====>' below indicates the role of this |
module. |
module. |
|
|
NSDL ---------E<gt> B<Gateway ========E<gt> LON-CAPA> |
NSDL ---------E<gt> Gateway --------E<gt> LON-CAPA |
|
|
LON-CAPA -----E<gt> Gateway --------E<gt> NSDL |
B<LON-CAPA =====E<gt> Gateway> --------E<gt> NSDL |
|
|
=head2 EXIT CODES |
=head2 EXIT CODES |
|
|