--- loncom/interface/loncreateuser.pm 2007/01/16 19:56:41 1.144
+++ loncom/interface/loncreateuser.pm 2007/03/12 17:06:59 1.148
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.144 2007/01/16 19:56:41 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.148 2007/03/12 17:06:59 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -135,7 +135,6 @@ sub portfolio_quota {
sub print_username_entry_form {
my ($r) = @_;
my $defdom=$env{'request.role.domain'};
- my @domains = &Apache::loncommon::get_domains();
my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain');
my $selscript=&Apache::loncommon::studentbrowser_javascript();
my $start_page =
@@ -454,11 +453,7 @@ ENDSECCODE
ENDFORMINFO
my $uhome=&Apache::lonnet::homeserver($ccuname,$ccdomain);
- my %incdomains;
my %inccourses;
- foreach my $item (values(%Apache::lonnet::hostdom)) {
- $incdomains{$item}=1;
- }
foreach my $key (keys(%env)) {
if ($key=~/^user\.priv\.cm\.\/($match_domain)\/($match_username)/) {
$inccourses{$1.'_'.$2}=1;
@@ -932,7 +927,7 @@ ENDNOPRIV
&mt('Extent').''.
'
'.&mt('Start').' | '.&mt('End').' | '.
&Apache::loncommon::end_data_table_header_row();
- foreach my $thisdomain ( sort( keys(%incdomains))) {
+ foreach my $thisdomain (sort(&Apache::lonnet::all_domains())) {
foreach my $role ('dc','li','dg','au','sc') {
if (&Apache::lonnet::allowed('c'.$role,$thisdomain)) {
my $plrole=&Apache::lonnet::plaintext($role);
@@ -1069,8 +1064,8 @@ ENDNEWUSERHEAD
if (lc($desiredhost) eq 'default') {
$desiredhost = undef;
} else {
- my %home_servers = &Apache::loncommon::get_library_servers
- ($env{'form.ccdomain'});
+ my %home_servers =
+ &Apache::lonnet::get_servers($env{'form.ccdomain'},'library');
if (! exists($home_servers{$desiredhost})) {
$r->print($error.&mt('Invalid home server specified'));
return;
@@ -1087,7 +1082,7 @@ ENDNEWUSERHEAD
my $home = &Apache::lonnet::homeserver($env{'form.ccuname'},
$env{'form.ccdomain'});
$r->print('
'.&mt('Home server').': '.$home.' '.
- $Apache::lonnet::libserv{$home});
+ &Apache::lonnet::hostname($home));
} elsif (($env{'form.login'} ne 'nochange') &&
($env{'form.login'} ne '' )) {
# Modify user privileges
@@ -1838,7 +1833,7 @@ sub course_sections {
$output = '