[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /interface loncreateuser.pm

raeburn raeburn@source.lon-capa.org
Thu, 18 Dec 2008 17:28:24 -0000


raeburn		Thu Dec 18 17:28:24 2008 EDT

  Modified files:              (Branch: version_2_8_X)
    /loncom/interface	loncreateuser.pm 
  Log:
  - Backport 1.270, 1.271.
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.268.2.2 loncom/interface/loncreateuser.pm:1.268.2.3
--- loncom/interface/loncreateuser.pm:1.268.2.2	Mon Dec 15 00:54:54 2008
+++ loncom/interface/loncreateuser.pm	Thu Dec 18 17:28:24 2008
@@ -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.3 2008/12/18 17:28:24 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2125,18 +2125,20 @@
                     &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);
+                        }
                     }
                 }
             }