[LON-CAPA-cvs] cvs: loncom /interface loncreatecourse.pm loncreateuser.pm lonuserutils.pm

raeburn raeburn@source.lon-capa.org
Tue, 14 Sep 2010 06:02:35 -0000


raeburn		Tue Sep 14 06:02:35 2010 EDT

  Modified files:              
    /loncom/interface	lonuserutils.pm loncreateuser.pm 
                     	loncreatecourse.pm 
  Log:
  - Move lonnet::flushcourselogs() call to cleanup phase, so delivery of
    content to user is not delayed.
  
  
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.121 loncom/interface/lonuserutils.pm:1.122
--- loncom/interface/lonuserutils.pm:1.121	Wed Aug  4 16:50:29 2010
+++ loncom/interface/lonuserutils.pm	Tue Sep 14 06:02:35 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility functions for managing LON-CAPA user accounts
 #
-# $Id: lonuserutils.pm,v 1.121 2010/08/04 16:50:29 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.122 2010/09/14 06:02:35 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4230,7 +4230,7 @@
             }
         } # end of foreach (@userdata)
         # Flush the course logs so reverse user roles immediately updated
-        &Apache::lonnet::flushcourselogs();
+        $r->register_cleanup(\&Apache::lonnet::flushcourselogs());
         $r->print("</p>\n<p>\n".&mt('Processed [quant,_1,user].',$counts{'user'}).
                   "</p>\n");
         if ($counts{'role'} > 0) {
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.347 loncom/interface/loncreateuser.pm:1.348
--- loncom/interface/loncreateuser.pm:1.347	Wed Sep  8 02:16:07 2010
+++ loncom/interface/loncreateuser.pm	Tue Sep 14 06:02:35 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.347 2010/09/08 02:16:07 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.348 2010/09/14 06:02:35 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3445,7 +3445,7 @@
 	}
     } # End of foreach (keys(%env))
 # Flush the course logs so reverse user roles immediately updated
-    &Apache::lonnet::flushcourselogs();
+    $r->register_cleanup(\&Apache::lonnet::flushcourselogs());
     if (@rolechanges == 0) {
         $r->print(&mt('No roles to modify'));
     }
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.142 loncom/interface/loncreatecourse.pm:1.143
--- loncom/interface/loncreatecourse.pm:1.142	Sat Aug 28 20:18:17 2010
+++ loncom/interface/loncreatecourse.pm	Tue Sep 14 06:02:35 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Create a course
 #
-# $Id: loncreatecourse.pm,v 1.142 2010/08/28 20:18:17 raeburn Exp $
+# $Id: loncreatecourse.pm,v 1.143 2010/09/14 06:02:35 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -689,7 +689,7 @@
 		      '<p><a href="/adm/managekeys?cid='.$crsudom.'_'.$crsunum.'">'.&mt('Manage Access Keys').'</a></p>');
 	}
         # Flush the course logs so reverse user roles immediately updated
-	&Apache::lonnet::flushcourselogs();
+	$r->register_cleanup(\&Apache::lonnet::flushcourselogs());
 	$r->print('<p>'.&mt('Roles will be active at next login').'.</p>');
     }
     $r->print('<p><a href="/adm/createcourse?phase='.lc($crstype).'one">'.