version 1.2, 2014/04/05 22:42:33
|
version 1.3, 2014/04/14 01:45:49
|
Line 96 Inputs: None
|
Line 96 Inputs: None
|
Returns: Nothing |
Returns: Nothing |
|
|
Description: Main program. Determines if requesting IP is the IP |
Description: Main program. Determines if requesting IP is the IP |
of the server enrollqueued.pl. Side effects |
of the of the validation server (as specified in |
prints content (with text/plain HTTP header). |
the domain configuration for self-enrollment). |
Content is URL self-enrolling user should user |
Side effects are to print content (with text/plain |
to access the course. |
HTTP header). Content is the URL self-enrolling user |
|
should use to access the course. |
|
|
=cut |
=cut |
|
|
Line 198 sub main {
|
Line 199 sub main {
|
} |
} |
} |
} |
if ($field eq 'domain') { |
if ($field eq 'domain') { |
if ($query->param($field) =~ /^LONCAPA::match_username$/) { |
if ($query->param($field) =~ /^LONCAPA::match_domain$/) { |
$params{$field} = $query->param($field); |
$params{$field} = $query->param($field); |
} |
} |
} |
} |
Line 275 sub process_enrollment {
|
Line 276 sub process_enrollment {
|
my $udom = $params->{'domain'}; |
my $udom = $params->{'domain'}; |
my $token = $params->{'token'}; |
my $token = $params->{'token'}; |
my $uhome = &Apache::lonnet::homeserver($uname,$udom); |
my $uhome = &Apache::lonnet::homeserver($uname,$udom); |
return if ($uhome eq 'nohost'); |
return if ($uhome eq 'no_host'); |
my %courseinfo; |
my %courseinfo; |
if ($cid eq '') { |
if ($cid eq '') { |
if ($params->{'uniquecode'}) { |
if ($params->{'uniquecode'}) { |