version 1.66, 2003/07/25 01:18:04
|
version 1.70.2.1, 2004/01/19 23:09:07
|
Line 63 use strict;
|
Line 63 use strict;
|
use Apache::Constants qw(:common :http); |
use Apache::Constants qw(:common :http); |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon; |
use Apache::loncommon; |
|
use Apache::lonlocal; |
|
|
my $loginscript; # piece of javascript used in two separate instances |
my $loginscript; # piece of javascript used in two separate instances |
my $generalrule; |
my $generalrule; |
Line 310 END
|
Line 311 END
|
<table border=2> |
<table border=2> |
<tr><th>Revoke</th><th>Delete</th><th>Role</th><th>Extent</th><th>Start</th><th>End</th> |
<tr><th>Revoke</th><th>Delete</th><th>Role</th><th>Extent</th><th>Start</th><th>End</th> |
END |
END |
foreach my $area (sort keys(%rolesdump)) { |
foreach my $area (sort { my $a1=join('_',(split('_',$a))[1,0]); |
|
my $b1=join('_',(split('_',$b))[1,0]); |
|
return $a1 cmp $b1; |
|
} keys(%rolesdump)) { |
next if ($area =~ /^rolesdef/); |
next if ($area =~ /^rolesdef/); |
my $role = $rolesdump{$area}; |
my $role = $rolesdump{$area}; |
my $thisrole=$area; |
my $thisrole=$area; |
Line 544 ENDCOAUTH
|
Line 548 ENDCOAUTH
|
'<th>Start</th><th>End</th></tr>'); |
'<th>Start</th><th>End</th></tr>'); |
foreach ( sort( keys(%incdomains))) { |
foreach ( sort( keys(%incdomains))) { |
my $thisdomain=$_; |
my $thisdomain=$_; |
foreach ('dc','li','dg','au') { |
foreach ('dc','li','dg','au','sc') { |
if (&Apache::lonnet::allowed('c'.$_,$thisdomain)) { |
if (&Apache::lonnet::allowed('c'.$_,$thisdomain)) { |
my $plrole=&Apache::lonnet::plaintext($_); |
my $plrole=&Apache::lonnet::plaintext($_); |
$r->print(<<ENDDROW); |
$r->print(<<ENDDROW); |
Line 654 ENDTHREEHEAD
|
Line 658 ENDTHREEHEAD
|
if ($ENV{'form.makeuser'}) { |
if ($ENV{'form.makeuser'}) { |
# Create a new user |
# Create a new user |
$r->print(<<ENDNEWUSERHEAD); |
$r->print(<<ENDNEWUSERHEAD); |
<h3>Creating user "$ENV{'form.ccuname'}" in domain "$ENV{'form.ccdomain'}"</h2> |
<h3>Creating user "$ENV{'form.ccuname'}" in domain "$ENV{'form.ccdomain'}"</h3> |
ENDNEWUSERHEAD |
ENDNEWUSERHEAD |
# Check for the authentication mode and password |
# Check for the authentication mode and password |
if (! $amode || ! $genpwd) { |
if (! $amode || ! $genpwd) { |
Line 683 ENDNEWUSERHEAD
|
Line 687 ENDNEWUSERHEAD
|
$r->print('Generating user: '.$result); |
$r->print('Generating user: '.$result); |
my $home = &Apache::lonnet::homeserver($ENV{'form.ccuname'}, |
my $home = &Apache::lonnet::homeserver($ENV{'form.ccuname'}, |
$ENV{'form.ccdomain'}); |
$ENV{'form.ccdomain'}); |
$r->print('<br>Home server: '.$home.' '. |
$r->print('<br />Home server: '.$home.' '. |
$Apache::lonnet::libserv{$home}); |
$Apache::lonnet::libserv{$home}); |
} elsif (($ENV{'form.login'} ne 'nochange') && |
} elsif (($ENV{'form.login'} ne 'nochange') && |
($ENV{'form.login'} ne '' )) { |
($ENV{'form.login'} ne '' )) { |
Line 909 END
|
Line 913 END
|
} |
} |
} |
} |
} # End of foreach (keys(%ENV)) |
} # End of foreach (keys(%ENV)) |
|
# Flush the course logs so reverse user roles immediately updated |
|
&Apache::lonnet::flushcourselogs(); |
$r->print('</body></html>'); |
$r->print('</body></html>'); |
} |
} |
|
|
Line 1079 sub handler {
|
Line 1085 sub handler {
|
my $r = shift; |
my $r = shift; |
|
|
if ($r->header_only) { |
if ($r->header_only) { |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
return OK; |
return OK; |
} |
} |
Line 1090 sub handler {
|
Line 1096 sub handler {
|
(&Apache::lonnet::allowed('cep',$ENV{'request.course.id'})) || |
(&Apache::lonnet::allowed('cep',$ENV{'request.course.id'})) || |
(&Apache::lonnet::allowed('cca',$ENV{'request.role.domain'})) || |
(&Apache::lonnet::allowed('cca',$ENV{'request.role.domain'})) || |
(&Apache::lonnet::allowed('mau',$ENV{'request.role.domain'}))) { |
(&Apache::lonnet::allowed('mau',$ENV{'request.role.domain'}))) { |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
unless ($ENV{'form.phase'}) { |
unless ($ENV{'form.phase'}) { |
&print_username_entry_form($r); |
&print_username_entry_form($r); |