--- loncom/interface/loncreateuser.pm 2008/12/15 00:54:54 1.268.2.2
+++ loncom/interface/loncreateuser.pm 2008/12/28 22:13:27 1.268.2.4
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.268.2.2 2008/12/15 00:54:54 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.268.2.4 2008/12/28 22:13:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -213,7 +213,6 @@ END_SCRIPT
$tool_on = '';
}
}
- $curr_access = &Apache::lonnet::usertools_access($ccuname,$ccdomain,$item);
$output .= '
'."\n".
' '.$lt{$item}.' | '."\n".
'
'."\n".
@@ -2071,7 +2070,6 @@ sub update_user_data {
}
} else {
$changed{$tool} = &tool_admin($tool,'',\%changeHash);
- print STDERR "for $tool - changed is $changed{$tool}\n";
if ($changed{$tool}) {
$newaccess{$tool} = &mt('default');
} else {
@@ -2125,18 +2123,20 @@ sub update_user_data {
&Apache::lonnet::put('environment',\%changeHash,
$env{'form.ccdomain'},$env{'form.ccuname'});
if ($chgresult eq 'ok') {
- my %newenvhash;
- my $hashid="$env{'form.ccuname'}:$env{'form.ccdomain'}";
- foreach my $key (keys(%changed)) {
- if ($key ne 'quota') {
- &Apache::lonnet::devalidate_cache_new('usertools.'.$key,$hashid);
- $newenvhash{'environment.tools.'.$key} =
- $changeHash{'tools.'.$key};
- }
- }
if (($env{'user.name'} eq $env{'form.ccuname'}) &&
($env{'user.domain'} eq $env{'form.ccdomain'})) {
- &Apache::lonnet::appenv(\%newenvhash);
+ my %newenvhash;
+ foreach my $key (keys(%changed)) {
+ if ($key ne 'quota') {
+ $newenvhash{'environment.tools.'.$key} =
+ $changeHash{'tools.'.$key};
+ $newenvhash{'environment.availabletools.'.$key} =
+ $changeHash{'tools.'.$key};
+ }
+ }
+ if (keys(%newenvhash)) {
+ &Apache::lonnet::appenv(\%newenvhash);
+ }
}
}
}