version 1.334, 2010/03/05 06:37:43
|
version 1.338, 2010/04/02 14:18:50
|
Line 1455 sub display_existing_roles {
|
Line 1455 sub display_existing_roles {
|
$newkey .= '_'.$newrole; |
$newkey .= '_'.$newrole; |
if ($start ne '' && $end ne '') { |
if ($start ne '' && $end ne '') { |
$newvalue .= '_'.$end.'_'.$start; |
$newvalue .= '_'.$end.'_'.$start; |
|
} elsif ($end ne '') { |
|
$newvalue .= '_'.$end; |
} |
} |
$rolesdump{$newkey} = $newvalue; |
$rolesdump{$newkey} = $newvalue; |
} |
} |
Line 2580 sub update_user_data {
|
Line 2582 sub update_user_data {
|
push(@disporder,'reqcrsotherdom'); |
push(@disporder,'reqcrsotherdom'); |
} |
} |
push(@disporder,('quota','tools')); |
push(@disporder,('quota','tools')); |
my ($defquota,my $settingstatus) = |
$oldinststatus = $userenv{'inststatus'}; |
|
my ($defquota,$settingstatus) = |
&Apache::loncommon::default_quota($env{'form.ccdomain'},$oldinststatus); |
&Apache::loncommon::default_quota($env{'form.ccdomain'},$oldinststatus); |
my %canshow; |
my %canshow; |
if (&Apache::lonnet::allowed('mpq',$env{'form.ccdomain'})) { |
if (&Apache::lonnet::allowed('mpq',$env{'form.ccdomain'})) { |
Line 2598 sub update_user_data {
|
Line 2601 sub update_user_data {
|
$canshow{'inststatus'} = 1; |
$canshow{'inststatus'} = 1; |
} |
} |
my (%changeHash,%changed); |
my (%changeHash,%changed); |
$oldinststatus = $userenv{'inststatus'}; |
|
if ($oldinststatus eq '') { |
if ($oldinststatus eq '') { |
$oldsettings{'inststatus'} = $othertitle; |
$oldsettings{'inststatus'} = $othertitle; |
} else { |
} else { |
Line 2622 sub update_user_data {
|
Line 2624 sub update_user_data {
|
if (ref($usertypes) eq 'HASH') { |
if (ref($usertypes) eq 'HASH') { |
$newsettings{'inststatus'} = join(', ',map{ $usertypes->{$_}; } (@inststatuses)); |
$newsettings{'inststatus'} = join(', ',map{ $usertypes->{$_}; } (@inststatuses)); |
} else { |
} else { |
$newsettings{'inststatus'} = join(', ',map{ $usertypes->{$_}; } (@inststatuses)); |
$newsettings{'inststatus'} = join(', ',@inststatuses); |
} |
} |
} |
} |
} else { |
} else { |
Line 2635 sub update_user_data {
|
Line 2637 sub update_user_data {
|
} |
} |
} elsif ($context ne 'selfcreate') { |
} elsif ($context ne 'selfcreate') { |
$canshow{'inststatus'} = 1; |
$canshow{'inststatus'} = 1; |
|
$newsettings{'inststatus'} = $oldsettings{'inststatus'}; |
} |
} |
$changeHash{'portfolioquota'} = $userenv{'portfolioquota'}; |
$changeHash{'portfolioquota'} = $userenv{'portfolioquota'}; |
if ($context eq 'domain') { |
if ($context eq 'domain') { |
Line 2695 sub update_user_data {
|
Line 2698 sub update_user_data {
|
$oldsettings{'quota'} = $oldportfolioquota.' Mb'; |
$oldsettings{'quota'} = $oldportfolioquota.' Mb'; |
$newsettings{'quota'} = $newportfolioquota.' Mb'; |
$newsettings{'quota'} = $newportfolioquota.' Mb'; |
if ((keys(%namechanged) > 0) || (keys(%changed) > 0)) { |
if ((keys(%namechanged) > 0) || (keys(%changed) > 0)) { |
$changeHash{'firstname'} = $env{'form.cfirstname'}; |
|
$changeHash{'middlename'} = $env{'form.cmiddlename'}; |
|
$changeHash{'lastname'} = $env{'form.clastname'}; |
|
$changeHash{'generation'} = $env{'form.cgeneration'}; |
|
$changeHash{'id'} = $env{'form.cid'}; |
|
$changeHash{'permanentemail'} = $env{'form.cpermanentemail'}; |
|
my ($chgresult,$namechgresult); |
my ($chgresult,$namechgresult); |
if (keys(%changed) > 0) { |
if (keys(%changed) > 0) { |
$chgresult = |
$chgresult = |
Line 2741 sub update_user_data {
|
Line 2738 sub update_user_data {
|
} |
} |
} |
} |
if (keys(%namechanged) > 0) { |
if (keys(%namechanged) > 0) { |
# Make the change |
foreach my $field (@userinfo) { |
|
$changeHash{$field} = $env{'form.c'.$field}; |
|
} |
|
# Make the change |
$namechgresult = |
$namechgresult = |
&Apache::lonnet::modifyuser($env{'form.ccdomain'}, |
&Apache::lonnet::modifyuser($env{'form.ccdomain'}, |
$env{'form.ccuname'},$changeHash{'id'},undef,undef, |
$env{'form.ccuname'},$changeHash{'id'},undef,undef, |
$changeHash{'firstname'},$changeHash{'middlename'}, |
$changeHash{'firstname'},$changeHash{'middlename'}, |
$changeHash{'lastname'},$changeHash{'generation'}, |
$changeHash{'lastname'},$changeHash{'generation'}, |
$changeHash{'id'},undef,$changeHash{'permanentemail'}); |
$changeHash{'id'},undef,$changeHash{'permanentemail'},undef,\@userinfo); |
%userupdate = ( |
%userupdate = ( |
lastname => $env{'form.clastname'}, |
lastname => $env{'form.clastname'}, |
middlename => $env{'form.cmiddlename'}, |
middlename => $env{'form.cmiddlename'}, |
Line 4129 sub handler {
|
Line 4129 sub handler {
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs("Update Users", |
$r->print(&Apache::lonhtmlcommon::breadcrumbs("Update Users", |
'Course_View_Class_List')); |
'Course_View_Class_List')); |
if ($permission->{'cusr'}) { |
if ($permission->{'cusr'}) { |
&Apache::lonuserutils::update_user_list($r,$context,$setting,$choice); |
&Apache::lonuserutils::update_user_list($r,$context,$setting,$choice,$crstype); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} else { |
} else { |
$r->print(&mt('You are not authorized to make bulk changes to user roles')); |
$r->print(&mt('You are not authorized to make bulk changes to user roles')); |
Line 6269 sub update_selfenroll_config {
|
Line 6269 sub update_selfenroll_config {
|
$newnum ++; |
$newnum ++; |
} |
} |
} |
} |
for (my $j=0; $j<$env{'form.selfenroll_types_total'}; $j++) { if ((!grep(/^$j$/,@deletedoms)) && (!grep(/^$j$/,@activations))) { |
for (my $j=0; $j<$env{'form.selfenroll_types_total'}; $j++) { |
|
if ((!grep(/^$j$/,@deletedoms)) && (!grep(/^$j$/,@activations))) { |
my @types = &Apache::loncommon::get_env_multiple('form.selfenroll_types_'.$j); |
my @types = &Apache::loncommon::get_env_multiple('form.selfenroll_types_'.$j); |
if (@types > 0) { |
if (@types > 0) { |
@types = sort(@types); |
@types = sort(@types); |