--- loncom/interface/loncreateuser.pm 2008/01/06 04:38:57 1.229 +++ loncom/interface/loncreateuser.pm 2008/01/20 01:40:37 1.232 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.229 2008/01/06 04:38:57 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.232 2008/01/20 01:40:37 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -156,21 +156,21 @@ END_SCRIPT $custom_off = ' '; $showquota = $currquota; if ($longinsttype eq '') { - $defaultinfo = &mt('For this user, the default quota would be [_1] - Mb.',$defquota); + $defaultinfo = &mt('For this user, the default quota would be [_1]' + .' Mb.',$defquota); } else { - $defaultinfo = &mt("For this user, the default quota would be [_1] - Mb, as determined by the user's institutional - affiliation ([_2]).",$defquota,$longinsttype); + $defaultinfo = &mt("For this user, the default quota would be [_1]". + " Mb, as determined by the user's institutional". + " affiliation ([_2]).",$defquota,$longinsttype); } } else { if ($longinsttype eq '') { - $defaultinfo = &mt('For this user, the default quota is [_1] - Mb.',$defquota); + $defaultinfo = &mt('For this user, the default quota is [_1]' + .' Mb.',$defquota); } else { - $defaultinfo = &mt("For this user, the default quota of [_1] - Mb, is determined by the user's institutional - affiliation ([_2]).",$defquota,$longinsttype); + $defaultinfo = &mt("For this user, the default quota of [_1]". + " Mb, is determined by the user's institutional". + " affiliation ([_2]).",$defquota,$longinsttype); } } my $output = $quota_javascript. @@ -1636,6 +1636,27 @@ sub update_user_data { $r->print(&mt('Generating user').': '.$result); $uhome = &Apache::lonnet::homeserver($env{'form.ccuname'}, $env{'form.ccdomain'}); + if (($uhome ne 'no_host') && ($env{'form.customquota'} == 1)) { + my (%changeHash,$newportfolioquota); + if ($env{'form.portfolioquota'} eq '') { + $newportfolioquota = 0; + } else { + $newportfolioquota = $env{'form.portfolioquota'}; + $newportfolioquota =~ s/[^\d\.]//g; + } + my $quotachanged = "a_admin($newportfolioquota,\%changeHash); + if ($quotachanged) { + $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 $quotachgresult = + &Apache::lonnet::put('environment',\%changeHash, + $env{'form.ccdomain'},$env{'form.ccuname'}); + } + } $r->print('
'.&mt('Home server').': '.$uhome.' '. &Apache::lonnet::hostname($uhome)); } elsif (($env{'form.login'} ne 'nochange') &&