'.
+ &personal_data_display($ccuname,$ccdomain,$newuser,
+ %inst_results).
+ '
');
+ my $user_auth_text =
+ &user_authentication($ccuname,$ccdomain,$krbdefdom,\%abv_auth);
+ my $user_quota_text;
+ if (&Apache::lonnet::allowed('mpq',$ccdomain)) {
+ # Current user has quota modification privileges
+ $user_quota_text = &portfolio_quota($ccuname,$ccdomain);
+ } elsif (&Apache::lonnet::allowed('mpq',$env{'request.role.domain'})) {
+ # Get the user's portfolio information
+ my %portq = &Apache::lonnet::get('environment',['portfolioquota'],
+ $ccdomain,$ccuname);
+
+ my %lt=&Apache::lonlocal::texthash(
+ 'dska' => "Disk space allocated to user's portfolio files",
+ 'youd' => "You do not have privileges to modify the portfolio quota for this user.",
+ 'ichr' => "If a change is required, contact a domain coordinator for the domain",
+ );
+ $user_quota_text = <$lt{'dska'}
+$lt{'youd'} $lt{'ichr'}: $ccdomain
+ENDNOPORTPRIV
+ }
+ if ($user_auth_text ne '') {
+ $r->print(''.$user_auth_text);
+ if ($user_quota_text ne '') {
+ $r->print($user_quota_text);
+ }
+ $r->print('
');
+
+ } elsif ($user_quota_text ne '') {
+ $r->print(''.$user_quota_text.'
');
}
- $r->print(&Apache::loncommon::end_data_table_row().
- &Apache::loncommon::end_data_table());
+ $r->print('');
+ my %rolesdump=&Apache::lonnet::dump('roles',$ccdomain,$ccuname);
# Build up table of user roles to allow revocation of a role.
my ($tmp) = keys(%rolesdump);
unless ($tmp =~ /^(con_lost|error)/i) {
@@ -952,7 +1022,7 @@ END
$plaintext=&Apache::lonnet::plaintext($role_code,$class)
} else {
$plaintext=
- "Customrole '$croletitle' defined by $croleuname\@$croleudom";
+ "Customrole '$croletitle'
defined by $croleuname\@$croleudom";
}
$row.= ''.$plaintext.
' | '.$area.
@@ -988,7 +1058,6 @@ END
}
if ($rolesdisplay == 1) {
$r->print('
-
'.$lt{'rer'}.''.
&Apache::loncommon::start_data_table("LC_createuser").
&Apache::loncommon::start_data_table_header_row().
@@ -1004,128 +1073,16 @@ END
$r->print(&Apache::loncommon::end_data_table());
}
} # End of unless
- my $currentauth=&Apache::lonnet::queryauthenticate($ccuname,$ccdomain);
- if ($currentauth=~/^krb(4|5):/) {
- $currentauth=~/^krb(4|5):(.*)/;
- my $krbdefdom=$2;
- my %param = ( formname => 'document.cu',
- kerb_def_dom => $krbdefdom
- );
- $loginscript = &Apache::loncommon::authform_header(%param);
- }
- # Check for a bad authentication type
- unless ($currentauth=~/^krb(4|5):/ or
- $currentauth=~/^unix:/ or
- $currentauth=~/^internal:/ or
- $currentauth=~/^localauth:/
- ) { # bad authentication scheme
- if (&Apache::lonnet::allowed('mau',$ccdomain)) {
- &initialize_authen_forms();
- my %lt=&Apache::lonlocal::texthash(
- 'err' => "ERROR",
- 'uuas' => "This user has an unrecognized authentication scheme",
- 'sldb' => "Please specify login data below",
- 'ld' => "Login Data"
- );
- $r->print(<
-
-$lt{'err'}:
-$lt{'uuas'} ($currentauth). $lt{'sldb'}.
-$lt{'ld'}
-$generalrule
-$authformkrb
-$authformint
-$authformfsys
-$authformloc
-ENDBADAUTH
- } else {
- # This user is not allowed to modify the user's
- # authentication scheme, so just notify them of the problem
- my %lt=&Apache::lonlocal::texthash(
- 'err' => "ERROR",
- 'uuas' => "This user has an unrecognized authentication scheme",
- 'adcs' => "Please alert a domain coordinator of this situation"
- );
- $r->print(<
- $lt{'err'}:
-$lt{'uuas'} ($currentauth). $lt{'adcs'}.
-
-ENDBADAUTH
- }
- } else { # Authentication type is valid
- my $authformcurrent='';
- my $authform_other='';
- &initialize_authen_forms();
- if ($currentauth=~/^krb(4|5):/) {
- $authformcurrent=$authformkrb;
- $authform_other="$authformint \n".
- "$authformfsys $authformloc ";
- }
- elsif ($currentauth=~/^internal:/) {
- $authformcurrent=$authformint;
- $authform_other="$authformkrb ".
- "$authformfsys $authformloc ";
- }
- elsif ($currentauth=~/^unix:/) {
- $authformcurrent=$authformfsys;
- $authform_other="$authformkrb ".
- "$authformint $authformloc; ";
- }
- elsif ($currentauth=~/^localauth:/) {
- $authformcurrent=$authformloc;
- $authform_other="$authformkrb ".
- "$authformint $authformfsys ";
- }
- $authformcurrent.=' (will override current values) ';
- if (&Apache::lonnet::allowed('mau',$ccdomain)) {
- # Current user has login modification privileges
- my %lt=&Apache::lonlocal::texthash(
- 'ccld' => "Change Current Login Data",
- 'enld' => "Enter New Login Data"
- );
- $r->print(<
-
-$lt{'ccld'}
-$generalrule
-$authformnop
-$authformcurrent
-$lt{'enld'}
-$authform_other
-ENDOTHERAUTHS
- } else {
- if (&Apache::lonnet::allowed('mau',$env{'request.role.domain'})) {
- my %lt=&Apache::lonlocal::texthash(
- 'ccld' => "Change Current Login Data",
- 'yodo' => "You do not have privileges to modify the authentication configuration for this user.",
- 'ifch' => "If a change is required, contact a domain coordinator for the domain",
- );
- $r->print(<
-$lt{'ccld'}
-$lt{'yodo'} $lt{'ifch'}: $ccdomain
-ENDNOPRIV
- }
- }
- if (&Apache::lonnet::allowed('mpq',$env{'request.role.domain'})) {
- # Current user has quota modification privileges
- $r->print(&portfolio_quota($ccuname,$ccdomain));
- }
- } ## End of "check for bad authentication type" logic
} ## End of new user/old user logic
- $r->print('
'.&mt('Add Roles').'');
+ my $addrolesdisplay = 0;
+ $r->print(''.&mt('Add Roles').'');
#
# Co-Author
#
if (&authorpriv($env{'user.name'},$env{'request.role.domain'}) &&
($env{'user.name'} ne $ccuname || $env{'user.domain'} ne $ccdomain)) {
# No sense in assigning co-author role to yourself
+ $addrolesdisplay = 1;
my $cuname=$env{'user.name'};
my $cudom=$env{'request.role.domain'};
my %lt=&Apache::lonlocal::texthash(
@@ -1172,6 +1129,13 @@ ENDNOPRIV
"javascript:pjump('."'date_end','End Date Assistant Co-Author',document.cu.end_$cudom\_$cuname\_aa.value,'end_$cudom\_$cuname\_aa','cu.pres','dateset'".')">'.$lt{'sed'}.' | '."\n".
&Apache::loncommon::end_data_table_row()."\n".
&Apache::loncommon::end_data_table());
+ } elsif (!(&authorpriv($env{'user.name'},$env{'request.role.domain'}))) {
+ $r->print(''.
+ &mt('You do not have privileges to assign co-author roles.').
+ '');
+ } elsif (($env{'user.name'} eq $ccuname) &&
+ ($env{'user.domain'} eq $ccdomain)) {
+ $r->print(&mt('Assigning yourself a co-author or assistant co-author role in your own author area in Construction Space is not permitted'));
}
#
# Domain level
@@ -1212,33 +1176,314 @@ ENDNOPRIV
$domaintext.= &Apache::loncommon::end_data_table();
if ($num_domain_level > 0) {
$r->print($domaintext);
+ $addrolesdisplay = 1;
}
#
-# Course and group levels
+# Course level
#
if ($env{'request.role'} =~ m{^dc\./($match_domain)/$}) {
$r->print(&course_level_dc($1,'Course'));
- $r->print('
'."\n");
+ $r->print('
'."\n");
+ } elsif ($env{'request.role'} =~ m{^au\./($match_domain)/$}) {
+ if ($addrolesdisplay) {
+ $r->print('
print(' onClick="verify_message(this.form)" \>'."\n");
+ } else {
+ $r->print('onClick="this.form.submit()" \>'."\n");
+ }
+ } else {
+ $r->print('
'.
+ &mt('Back to previous page').'');
+ }
} else {
$r->print(&course_level_table(%inccourses));
- $r->print('
'."\n");
+ $r->print('
'."\n");
}
- $r->print(&Apache::lonhtmlcommon::echo_form_input(['phase','userrole','ccdomain','prevphase','currstate']));
+ $r->print(&Apache::lonhtmlcommon::echo_form_input(['phase','userrole','ccdomain','prevphase','currstate','ccuname','ccdomain']));
$r->print('');
$r->print('');
$r->print("".&Apache::loncommon::end_page());
}
+sub user_authentication {
+ my ($ccuname,$ccdomain,$krbdefdom,$abv_auth) = @_;
+ my $currentauth=&Apache::lonnet::queryauthenticate($ccuname,$ccdomain);
+ my ($loginscript,$outcome);
+ if ($currentauth=~/^(krb)(4|5):(.*)/) {
+ my $long_auth = $1.$2;
+ my $curr_kerb_ver = $2;
+ my $krbdefdom=$3;
+ my $curr_authtype = $abv_auth->{$long_auth};
+ my %param = ( formname => 'document.cu',
+ kerb_def_dom => $krbdefdom,
+ domain => $ccdomain,
+ curr_authtype => $curr_authtype,
+ curr_kerb_ver => $curr_kerb_ver,
+ );
+ $loginscript = &Apache::loncommon::authform_header(%param);
+ }
+ # Check for a bad authentication type
+ if ($currentauth !~ /^(krb4|krb5|unix|internal|localauth):/) {
+ # bad authentication scheme
+ my %lt=&Apache::lonlocal::texthash(
+ 'err' => "ERROR",
+ 'uuas' => "This user has an unrecognized authentication scheme",
+ 'adcs' => "Please alert a domain coordinator of this situation",
+ 'sldb' => "Please specify login data below",
+ 'ld' => "Login Data"
+ );
+ if (&Apache::lonnet::allowed('mau',$ccdomain)) {
+ &initialize_authen_forms($ccdomain);
+ my $choices = &set_login($ccdomain);
+ $outcome = <
+$loginscript
+
+$lt{'err'}:
+$lt{'uuas'} ($currentauth). $lt{'sldb'}.
+$lt{'ld'}
+$choices
+ENDBADAUTH
+ } else {
+ # This user is not allowed to modify the user's
+ # authentication scheme, so just notify them of the problem
+ $outcome = < $lt{'err'}:
+$lt{'uuas'} ($currentauth). $lt{'adcs'}.
+
+ENDBADAUTH
+ }
+ } else { # Authentication type is valid
+ my $authformcurrent='';
+ my $authform_other='';
+ &initialize_authen_forms($ccdomain,$currentauth);
+ my ($authformcurrent,$authform_other,$can_modify) =
+ &modify_login_block($ccdomain,$currentauth);
+ if (&Apache::lonnet::allowed('mau',$ccdomain)) {
+ # Current user has login modification privileges
+ my %lt=&Apache::lonlocal::texthash (
+ 'ld' => "Login Data",
+ 'ccld' => "Change Current Login Data",
+ 'enld' => "Enter New Login Data"
+ );
+ $outcome =
+ ''."\n".
+ ''.$lt{'ld'}.'
'.
+ &Apache::loncommon::start_data_table().
+ &Apache::loncommon::start_data_table_row().
+ ''.$authformnop;
+ if ($can_modify) {
+ $outcome .= ' | '."\n".
+ &Apache::loncommon::end_data_table_row().
+ &Apache::loncommon::start_data_table_row().
+ ''.$authformcurrent.' | '.
+ &Apache::loncommon::end_data_table_row()."\n";
+ } else {
+ $outcome .= ' ('.$authformcurrent.')';
+ }
+ if ($authform_other ne '') {
+ $outcome .= $authform_other;
+ }
+ $outcome .= &Apache::loncommon::end_data_table_row().
+ &Apache::loncommon::end_data_table();
+ } else {
+ if (&Apache::lonnet::allowed('mau',$env{'request.role.domain'})) {
+ my %lt=&Apache::lonlocal::texthash(
+ 'ccld' => "Change Current Login Data",
+ 'yodo' => "You do not have privileges to modify the authentication configuration for this user.",
+ 'ifch' => "If a change is required, contact a domain coordinator for the domain",
+ );
+ $outcome .= <$lt{'ccld'}
+$lt{'yodo'} $lt{'ifch'}: $ccdomain
+ENDNOPRIV
+ }
+ }
+ } ## End of "check for bad authentication type" logic
+ return $outcome;
+}
+
+sub set_login {
+ my ($dom) = @_;
+ my %domconfig = &Apache::lonnet::get_dom('configuration',['usercreation'],$dom);
+ my $response;
+ my ($authnum,%can_assign) =
+ &Apache::loncommon::get_assignable_auth($dom);
+ if ($authnum) {
+ $response = &Apache::loncommon::start_data_table();
+ if (($can_assign{'krb4'}) || ($can_assign{'krb5'})) {
+ $response .= &Apache::loncommon::start_data_table_row().
+ ''.$authformkrb.' | '.
+ &Apache::loncommon::end_data_table_row()."\n";
+ }
+ if ($can_assign{'int'}) {
+ $response .= &Apache::loncommon::start_data_table_row().
+ ''.$authformint.' | '.
+ &Apache::loncommon::end_data_table_row()."\n"
+ }
+ if ($can_assign{'loc'}) {
+ $response .= &Apache::loncommon::start_data_table_row().
+ ''.$authformloc.' | '.
+ &Apache::loncommon::end_data_table_row()."\n";
+ }
+ $response .= &Apache::loncommon::end_data_table();
+ }
+ return $response;
+}
+
+sub modify_login_block {
+ my ($dom,$currentauth) = @_;
+ my %domconfig = &Apache::lonnet::get_dom('configuration',['usercreation'],$dom);
+ my ($authnum,%can_assign) =
+ &Apache::loncommon::get_assignable_auth($dom);
+ my ($authformcurrent,$authform_other,$show_override_msg);
+ if ($currentauth=~/^krb(4|5):/) {
+ $authformcurrent=$authformkrb;
+ if ($can_assign{'int'}) {
+ $authform_other = &Apache::loncommon::start_data_table_row().
+ ''.$authformint.' | '.
+ &Apache::loncommon::end_data_table_row()."\n"
+ }
+ if ($can_assign{'loc'}) {
+ $authform_other .= &Apache::loncommon::start_data_table_row().
+ ''.$authformloc.' | '.
+ &Apache::loncommon::end_data_table_row()."\n";
+ }
+ if (($can_assign{'krb4'}) || ($can_assign{'krb5'})) {
+ $show_override_msg = 1;
+ }
+ } elsif ($currentauth=~/^internal:/) {
+ $authformcurrent=$authformint;
+ if (($can_assign{'krb4'}) || ($can_assign{'krb5'})) {
+ $authform_other = &Apache::loncommon::start_data_table_row().
+ ''.$authformkrb.' | '.
+ &Apache::loncommon::end_data_table_row()."\n";
+ }
+ if ($can_assign{'loc'}) {
+ $authform_other .= &Apache::loncommon::start_data_table_row().
+ ''.$authformloc.' | '.
+ &Apache::loncommon::end_data_table_row()."\n";
+ }
+ if ($can_assign{'int'}) {
+ $show_override_msg = 1;
+ }
+ } elsif ($currentauth=~/^unix:/) {
+ $authformcurrent=$authformfsys;
+ if (($can_assign{'krb4'}) || ($can_assign{'krb5'})) {
+ $authform_other = &Apache::loncommon::start_data_table_row().
+ ''.$authformkrb.' | '.
+ &Apache::loncommon::end_data_table_row()."\n";
+ }
+ if ($can_assign{'int'}) {
+ $authform_other .= &Apache::loncommon::start_data_table_row().
+ ''.$authformint.' | '.
+ &Apache::loncommon::end_data_table_row()."\n"
+ }
+ if ($can_assign{'loc'}) {
+ $authform_other .= &Apache::loncommon::start_data_table_row().
+ ''.$authformloc.' | '.
+ &Apache::loncommon::end_data_table_row()."\n";
+ }
+ if ($can_assign{'fsys'}) {
+ $show_override_msg = 1;
+ }
+ } elsif ($currentauth=~/^localauth:/) {
+ $authformcurrent=$authformloc;
+ if (($can_assign{'krb4'}) || ($can_assign{'krb5'})) {
+ $authform_other = &Apache::loncommon::start_data_table_row().
+ ''.$authformkrb.' | '.
+ &Apache::loncommon::end_data_table_row()."\n";
+ }
+ if ($can_assign{'int'}) {
+ $authform_other .= &Apache::loncommon::start_data_table_row().
+ ''.$authformint.' | '.
+ &Apache::loncommon::end_data_table_row()."\n"
+ }
+ if ($can_assign{'loc'}) {
+ $show_override_msg = 1;
+ }
+ }
+ if ($show_override_msg) {
+ $authformcurrent.= ' '.
+ &mt('will override current values').
+ '
';
+ }
+ return ($authformcurrent,$authform_other,$show_override_msg);
+}
+
+sub personal_data_display {
+ my ($ccuname,$ccdomain,$newuser,%inst_results) = @_;
+ my ($output,%userenv);
+ if (!$newuser) {
+ # Get the users information
+ %userenv = &Apache::lonnet::get('environment',
+ ['firstname','middlename','lastname','generation',
+ 'permanentemail','id'],$ccdomain,$ccuname);
+ }
+ my %lt=&Apache::lonlocal::texthash(
+ 'pd' => "Personal Data",
+ 'firstname' => "First Name",
+ 'middlename' => "Middle Name",
+ 'lastname' => "Last Name",
+ 'generation' => "Generation",
+ 'permanentemail' => "Permanent e-mail address",
+ 'id' => "ID/Student Number",
+ 'hs' => "Home Server",
+ 'lg' => "Login Data"
+ );
+ my @userinfo = ('firstname','middlename','lastname','generation',
+ 'permanentemail','id');
+ my %textboxsize = (
+ firstname => '15',
+ middlename => '15',
+ lastname => '15',
+ generation => '5',
+ permanentemail => '25',
+ id => '15',
+ );
+ my $genhelp=&Apache::loncommon::help_open_topic('Generation');
+ $output = ''.$lt{'pd'}.'
'.
+ &Apache::lonhtmlcommon::start_pick_box();
+ foreach my $item (@userinfo) {
+ my $rowtitle = $lt{$item};
+ if ($item eq 'generation') {
+ $rowtitle = $genhelp.$rowtitle;
+ }
+ $output .= &Apache::lonhtmlcommon::row_title($rowtitle,undef,'LC_oddrow_value')."\n";
+ if ($newuser) {
+ if ($inst_results{$item} ne '') {
+ $output .= ''.$inst_results{$item};
+ } else {
+ $output .= '';
+ }
+ } else {
+ if (&Apache::lonnet::allowed('mau',$ccdomain)) {
+ $output .= '';
+ } else {
+ $output .= $userenv{$item};
+ }
+ }
+ $output .= &Apache::lonhtmlcommon::row_closure(1);
+ }
+ $output .= &Apache::lonhtmlcommon::end_pick_box();
+ return $output;
+}
+
# ================================================================= Phase Three
sub update_user_data {
my ($r) = @_;
my $uhome=&Apache::lonnet::homeserver($env{'form.ccuname'},
$env{'form.ccdomain'});
# Error messages
- my $error = ''.&mt('Error').':';
- my $end = &Apache::loncommon::end_page();
-
+ my $error = ''.&mt('Error').': ';
+ my $end = '
'.
+ ''.
+ &mt('Return to previous page').''.&Apache::loncommon::end_page();
my $title;
if (exists($env{'form.makeuser'})) {
$title='Set Privileges for New User';
@@ -1271,6 +1516,7 @@ sub update_user_data {
$r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management'));
my %disallowed;
+ $r->print(&update_result_form($uhome));
# Check Inputs
if (! $env{'form.ccuname'} ) {
$r->print($error.&mt('No login name specified').'.'.$end);
@@ -1332,8 +1578,8 @@ sub update_user_data {
}
- $r->print(''.&mt('User [_1] in domain [_2]',
- $env{'form.ccuname'}, $env{'form.ccdomain'}).'
');
+ $r->print(''.&mt('User [_1] in domain [_2]',
+ $env{'form.ccuname'}, $env{'form.ccdomain'}).'
');
if ($env{'form.makeuser'}) {
$r->print(''.&mt('Creating new account.').'
');
@@ -1357,10 +1603,10 @@ sub update_user_data {
# Call modifyuser
my $result = &Apache::lonnet::modifyuser
($env{'form.ccdomain'},$env{'form.ccuname'},$env{'form.cstid'},
- $amode,$genpwd,$env{'form.cfirst'},
- $env{'form.cmiddle'},$env{'form.clast'},$env{'form.cgen'},
- undef,$desiredhost
- );
+ $amode,$genpwd,$env{'form.cfirstname'},
+ $env{'form.cmiddlename'},$env{'form.clastname'},
+ $env{'form.cgeneration'},undef,$desiredhost,
+ $env{'form.cpermanentemail'});
$r->print(&mt('Generating user').': '.$result);
my $home = &Apache::lonnet::homeserver($env{'form.ccuname'},
$env{'form.ccdomain'});
@@ -1519,9 +1765,9 @@ END
&Apache::lonnet::appenv(%newenvhash);
}
} else { # error occurred
- $r->print("".&mt('Unable to successfully change environment for')." ".
- $env{'form.ccuname'}." ".&mt('in domain')." ".
- $env{'form.ccdomain'}."
");
+ $r->print(''.&mt('Unable to successfully change environment for').' '.
+ $env{'form.ccuname'}.' '.&mt('in domain').' '.
+ $env{'form.ccdomain'}.'');
}
} else { # End of if ($env ... ) logic
my $putresult;
@@ -1537,8 +1783,7 @@ END
'disk' => "Disk space allocated to user's portfolio files",
);
$r->print(<<"END");
-$userenv{'firstname'} $userenv{'middlename'} $userenv{'lastname'} $userenv{'generation'}
-$lt{'mail'}: $userenv{'permanentemail'}
+$userenv{'firstname'} $userenv{'middlename'} $userenv{'lastname'} $userenv{'generation'} ($lt{'mail'}: $userenv{'permanentemail'})
END
if ($putresult eq 'ok') {
if ($oldportfolioquota != $newportfolioquota) {
@@ -1759,20 +2004,28 @@ END
} # End of foreach (keys(%env))
# Flush the course logs so reverse user roles immediately updated
&Apache::lonnet::flushcourselogs();
- $r->print(''.&mt('Create/Modify Another User').'
');
- $r->print(''."\n");
+ $r->print(&Apache::loncommon::end_page());
+}
+
+sub update_result_form {
+ my ($uhome) = @_;
+ my $outcome =
+ ''."\n";
foreach my $item ('srchby','srchin','srchtype','srchterm','srchdomain','ccuname','ccdomain') {
- $r->print(''."\n");
+ $outcome .= ''."\n";
}
foreach my $item ('sortby','seluname','seludom') {
if (exists($env{'form.'.$item})) {
- $r->print(''."\n");
+ $outcome .= ''."\n";
}
}
- $r->print(''."\n".
- ''."\n".
- '');
- $r->print(&Apache::loncommon::end_page());
+ if ($uhome eq 'no_host') {
+ $outcome .= ''."\n";
+ }
+ $outcome .= ''."\n".
+ ''."\n".
+ '';
+ return $outcome;
}
sub classlist_drop {
@@ -2079,14 +2332,14 @@ sub set_custom_role {
&Apache::lonnet::get('roles',["rolesdef_$rolename"]);
# ------------------------------------------------------- Does this role exist?
- $r->print('');
+ $r->print('');
if (($rdummy ne 'con_lost') && ($roledef ne '')) {
$r->print(&mt('Existing Role').' "');
} else {
$r->print(&mt('New Role').' "');
$roledef='';
}
- $r->print($rolename.'"
');
+ $r->print($rolename.'"');
# ------------------------------------------------------- What can be assigned?
my $sysrole='';
my $domrole='';
@@ -2164,6 +2417,9 @@ sub handler {
if ($env{'form.phase'} eq 'get_user_info') {
my ($currstate,$response,$forcenewuser,$results) =
&user_search_result($srch);
+ if ($env{'form.currstate'} eq 'modify') {
+ $currstate = $env{'form.currstate'};
+ }
if ($currstate eq 'select') {
&print_user_selection_page($r,$response,$srch,$results,'createuser',\@search);
} elsif ($currstate eq 'modify') {
@@ -2178,6 +2434,9 @@ sub handler {
}
$ccuname =&LONCAPA::clean_username($ccuname);
$ccdomain=&LONCAPA::clean_domain($ccdomain);
+ if ($env{'form.forcenewuser'}) {
+ $response = '';
+ }
&print_user_modification_page($r,$ccuname,$ccdomain,$srch,
$response);
} elsif ($currstate eq 'query') {
@@ -2494,7 +2753,6 @@ sub directorysrch_check {
}
}
-
sub get_courseusers {
my %advhash;
my $classlist = &Apache::loncoursedata::get_classlist();
@@ -2707,9 +2965,9 @@ ENDTIMEENTRY
if (%sections_count) {
my $currsec = &course_sections(\%sections_count,$customrole);
$table.=
- ''.
- ''.$lt{'exs'}.' '.
- $currsec.' | '.
+ ' | |