version 1.89, 2004/05/08 14:12:16
|
version 1.90, 2004/05/08 16:26:32
|
Line 129 sub handler {
|
Line 129 sub handler {
|
my $swinfo=&Apache::lonmenu::rawconfig(); |
my $swinfo=&Apache::lonmenu::rawconfig(); |
my $bodytag=&Apache::loncommon::bodytag |
my $bodytag=&Apache::loncommon::bodytag |
('Verifying Access Key to Unlock this Course'); |
('Verifying Access Key to Unlock this Course'); |
my $buttontext=&mt('Re-Enter Key'); |
my $buttontext=&mt('Enter Course'); |
my $message=&mt('Key Verification Failed').'<br /><a href="/adm/logout">'. |
my $message=&mt('Successfully registered key'); |
|
my $assignresult= |
|
&Apache::lonnet::assign_access_key( |
|
$ENV{'form.newkey'}, |
|
$authdom,$authnum, |
|
$ENV{'user.domain'}, |
|
$ENV{'user.name'}, |
|
'Assigned from '.$ENV{'REMOTE_ADDR'}.' at '.localtime().' for '. |
|
$trolecode); |
|
unless ($assignresult eq 'ok') { |
|
$assignresult=~s/^error\:\s*//; |
|
$message=&mt($assignresult). |
|
'<br /><a href="/adm/logout">'. |
&mt('Logout').'</a>'; |
&mt('Logout').'</a>'; |
|
$buttontext=&mt('Re-Enter Key'); |
|
} |
$r->print(<<ENDENTEREDKEY); |
$r->print(<<ENDENTEREDKEY); |
<head><title>Verifying Course Access Key</title> |
<head><title>Verifying Course Access Key</title> |
</head> |
</head> |
Line 143 $swinfo
|
Line 157 $swinfo
|
<form method="post"> |
<form method="post"> |
<input type="hidden" name="selectrole" value="1" /> |
<input type="hidden" name="selectrole" value="1" /> |
<input type="hidden" name="$trolecode" value="1" /> |
<input type="hidden" name="$trolecode" value="1" /> |
$message |
<font size="+2">$message</font><br /> |
<input type="submit" value="$buttontext" /> |
<input type="submit" value="$buttontext" /> |
</form> |
</form> |
</body></html> |
</body></html> |