[LON-CAPA-cvs] cvs: loncom /automation batchcreatecourse.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Wed, 31 Aug 2005 06:31:22 -0000


raeburn		Wed Aug 31 02:31:22 2005 EDT

  Modified files:              
    /loncom/automation	batchcreatecourse.pm 
  Log:
  Fix typo and unabbreviate hash keys, so that new LON-CAPA users can be created using all the provided user information.
  
  
Index: loncom/automation/batchcreatecourse.pm
diff -u loncom/automation/batchcreatecourse.pm:1.7 loncom/automation/batchcreatecourse.pm:1.8
--- loncom/automation/batchcreatecourse.pm:1.7	Tue Jul 12 11:44:01 2005
+++ loncom/automation/batchcreatecourse.pm	Wed Aug 31 02:31:22 2005
@@ -1,5 +1,5 @@
 #
-# $Id: batchcreatecourse.pm,v 1.7 2005/07/12 15:44:01 raeburn Exp $
+# $Id: batchcreatecourse.pm,v 1.8 2005/08/31 06:31:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -508,7 +508,7 @@
             my ($username,$userdom) = split/:/,$userkey;
             if (&Apache::lonnet::homeserver($username,$userdom) eq 'no_host') { # Add user if no account
                 my $firstrole = $$details{$num}{'users'}{$userkey}{'roles'}[0];
-                my $firssec = $$details{$num}{'users'}{$userkey}{$firstrole}{'usec'}[0];
+                my $firstsec = $$details{$num}{'users'}{$userkey}{$firstrole}{'usec'}[0];
                 my $userargs = {
                     'auth' => $$details{$num}{'users'}{$userkey}{'authtype'},
                     'authparam' => $$details{$num}{'users'}{$userkey}{'autharg'},
@@ -516,17 +516,17 @@
                     'udom' => $userdom,
                     'uname' => $username,
                     'pid' => $$details{$num}{'users'}{$userkey}{'studentID'},
-                    'first' => $$details{$num}{'users'}{$userkey}{'first'},
-                    'middle' => $$details{$num}{'users'}{$userkey}{'middle'},
-                    'last' => $$details{$num}{'users'}{$userkey}{'last'},
-                    'gene' => $$details{$num}{'users'}{$userkey}{'gene'},
+                    'first' => $$details{$num}{'users'}{$userkey}{'firstname'},
+                    'middle' => $$details{$num}{'users'}{$userkey}{'middlename'},
+                    'last' => $$details{$num}{'users'}{$userkey}{'lastname'},
+                    'gene' => $$details{$num}{'users'}{$userkey}{'generation'},
                     'usec' => $firstsec,
                     'end' => $$details{$num}{'users'}{$userkey}{'end'},
                     'start' => $$details{$num}{'users'}{$userkey}{'start'},
-                    'emailaddr' => $$details{$num}{'users'}{$userkey}{'email'},
+                    'emailaddr' => $$details{$num}{'users'}{$userkey}{'emailaddr'},
                     'cid' => $courseid,
-                    'crs' => $crsudom,
-                    'cdom' => $crsunum,
+                    'crs' => $crsunum,
+                    'cdom' => $crsudom,
                     'context' => 'createcourse',
                     'linefeed' => $linefeed,
                     'role' => $$details{$num}{'users'}{$userkey}{'roles'}[0],