version 1.295.2.31, 2010/03/23 16:44:46
|
version 1.295.2.32, 2010/04/14 19:46:56
|
Line 2574 sub update_user_data {
|
Line 2574 sub update_user_data {
|
} |
} |
my ($quotachanged,$oldportfolioquota,$newportfolioquota,$oldinststatus, |
my ($quotachanged,$oldportfolioquota,$newportfolioquota,$oldinststatus, |
$newinststatus,$oldisdefault,$newisdefault,%oldsettings, |
$newinststatus,$oldisdefault,$newisdefault,%oldsettings, |
%oldsettingstext,%newsettings,%newsettingstext,@disporder); |
%oldsettingstext,%newsettings,%newsettingstext,@disporder, |
|
$olddefquota,$oldsettingstatus,$newdefquota,$newsettingstatus); |
@disporder = ('inststatus'); |
@disporder = ('inststatus'); |
if ($env{'request.role.domain'} eq $env{'form.ccdomain'}) { |
if ($env{'request.role.domain'} eq $env{'form.ccdomain'}) { |
push(@disporder,'requestcourses'); |
push(@disporder,'requestcourses'); |
Line 2582 sub update_user_data {
|
Line 2583 sub update_user_data {
|
push(@disporder,'reqcrsotherdom'); |
push(@disporder,'reqcrsotherdom'); |
} |
} |
push(@disporder,('quota','tools')); |
push(@disporder,('quota','tools')); |
my ($defquota,$settingstatus) = |
$oldinststatus = $userenv{'inststatus'}; |
|
($olddefquota,$oldsettingstatus) = |
&Apache::loncommon::default_quota($env{'form.ccdomain'},$oldinststatus); |
&Apache::loncommon::default_quota($env{'form.ccdomain'},$oldinststatus); |
|
($newdefquota,$newsettingstatus) = ($olddefquota,$oldsettingstatus); |
my %canshow; |
my %canshow; |
if (&Apache::lonnet::allowed('mpq',$env{'form.ccdomain'})) { |
if (&Apache::lonnet::allowed('mpq',$env{'form.ccdomain'})) { |
$canshow{'quota'} = 1; |
$canshow{'quota'} = 1; |
Line 2600 sub update_user_data {
|
Line 2603 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 2620 sub update_user_data {
|
Line 2622 sub update_user_data {
|
$changeHash{'inststatus'} = $newinststatus; |
$changeHash{'inststatus'} = $newinststatus; |
if ($newinststatus ne $oldinststatus) { |
if ($newinststatus ne $oldinststatus) { |
$changed{'inststatus'} = $newinststatus; |
$changed{'inststatus'} = $newinststatus; |
|
($newdefquota,$newsettingstatus) = |
|
&Apache::loncommon::default_quota($env{'form.ccdomain'},$newinststatus); |
} |
} |
if (ref($usertypes) eq 'HASH') { |
if (ref($usertypes) eq 'HASH') { |
$newsettings{'inststatus'} = join(', ',map{ $usertypes->{$_}; } (@inststatuses)); |
$newsettings{'inststatus'} = join(', ',map{ $usertypes->{$_}; } (@inststatuses)); |
Line 2633 sub update_user_data {
|
Line 2637 sub update_user_data {
|
$newsettings{'inststatus'} = $othertitle; |
$newsettings{'inststatus'} = $othertitle; |
if ($newinststatus ne $oldinststatus) { |
if ($newinststatus ne $oldinststatus) { |
$changed{'inststatus'} = $changeHash{'inststatus'}; |
$changed{'inststatus'} = $changeHash{'inststatus'}; |
|
($newdefquota,$newsettingstatus) = |
|
&Apache::loncommon::default_quota($env{'form.ccdomain'},$newinststatus); |
} |
} |
} |
} |
} elsif ($context ne 'selfcreate') { |
} elsif ($context ne 'selfcreate') { |
Line 2655 sub update_user_data {
|
Line 2661 sub update_user_data {
|
} |
} |
} else { |
} else { |
$changed{'quota'} = "a_admin('',\%changeHash); |
$changed{'quota'} = "a_admin('',\%changeHash); |
$newportfolioquota = $defquota; |
$newportfolioquota = $newdefquota; |
$newisdefault = 1; |
$newisdefault = 1; |
} |
} |
} else { |
} else { |
$oldisdefault = 1; |
$oldisdefault = 1; |
$oldportfolioquota = $defquota; |
$oldportfolioquota = $olddefquota; |
if ($env{'form.customquota'} == 1) { |
if ($env{'form.customquota'} == 1) { |
if ($env{'form.portfolioquota'} eq '') { |
if ($env{'form.portfolioquota'} eq '') { |
$newportfolioquota = 0; |
$newportfolioquota = 0; |
Line 2670 sub update_user_data {
|
Line 2676 sub update_user_data {
|
} |
} |
$changed{'quota'} = "a_admin($newportfolioquota,\%changeHash); |
$changed{'quota'} = "a_admin($newportfolioquota,\%changeHash); |
} else { |
} else { |
$newportfolioquota = $defquota; |
$newportfolioquota = $newdefquota; |
$newisdefault = 1; |
$newisdefault = 1; |
} |
} |
} |
} |
if ($oldisdefault) { |
if ($oldisdefault) { |
$oldsettingstext{'quota'} = &get_defaultquota_text($settingstatus); |
$oldsettingstext{'quota'} = &get_defaultquota_text($oldsettingstatus); |
} |
} |
if ($newisdefault) { |
if ($newisdefault) { |
$newsettingstext{'quota'} = &get_defaultquota_text($settingstatus); |
$newsettingstext{'quota'} = &get_defaultquota_text($newsettingstatus); |
} |
} |
&tool_changes('tools',\@usertools,\%oldsettings,\%oldsettingstext,\%userenv, |
&tool_changes('tools',\@usertools,\%oldsettings,\%oldsettingstext,\%userenv, |
\%changeHash,\%changed,\%newsettings,\%newsettingstext); |
\%changeHash,\%changed,\%newsettings,\%newsettingstext); |