[LON-CAPA-cvs] cvs: loncom /enrollment Autoenroll.pl

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 01 Mar 2007 18:58:42 -0000


raeburn		Thu Mar  1 13:58:42 2007 EDT

  Modified files:              
    /loncom/enrollment	Autoenroll.pl 
  Log:
  Fix bug 5162. 
  - Now parts of a notification e-mail sent in response to changes caused by running Autoenroll.pl will be translated into the default language of the domain, when lonmsg::sendnotification() is executed.
  
  
Index: loncom/enrollment/Autoenroll.pl
diff -u loncom/enrollment/Autoenroll.pl:1.23 loncom/enrollment/Autoenroll.pl:1.24
--- loncom/enrollment/Autoenroll.pl:1.23	Mon Jan  1 14:19:58 2007
+++ loncom/enrollment/Autoenroll.pl	Thu Mar  1 13:58:42 2007
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 #
 #Automated Enrollment script
-# $Id: Autoenroll.pl,v 1.23 2007/01/01 19:19:58 raeburn Exp $
+# $Id: Autoenroll.pl,v 1.24 2007/03/01 18:58:42 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -35,6 +35,7 @@
     use Apache::lonmsg;
     use Apache::longroup;
     use Apache::loncommon;
+    use Apache::lonlocal;
     use HTML::Entities;
 
 # Determine the library server's domain and hostID
@@ -51,7 +52,9 @@
     #only run if configured to
         if (! &localenroll::run($dom)) { next; }
         $env{'user.domain'} = $dom;
-    # Determine the courses
+        # Initialize language handler
+        &Apache::lonlocal::get_language_handle();
+        # Determine the courses
         my %courses = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.',1,\@hostids,'Course'); 
         my %affiliates = ();
         my %enrollvar = ();