--- loncom/automation/Autocreate.pl 2010/03/30 15:24:52 1.13 +++ loncom/automation/Autocreate.pl 2010/08/28 19:00:42 1.15 @@ -2,7 +2,7 @@ # # Automated Course Creation script # -# $Id: Autocreate.pl,v 1.13 2010/03/30 15:24:52 raeburn Exp $ +# $Id: Autocreate.pl,v 1.15 2010/08/28 19:00:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -110,8 +110,15 @@ close($fh); exit; } + $env{'user.name'} = $dcname; + $env{'user.domain'} = $dcdom; + $env{'request.role.domain'} = $defdom; + my @permissions = ('mau','ccc','cin','cta','cep','ccr','cst'); + my %permissionflags = (); + &set_permissions(\%permissionflags,\@permissions); my $output = &process_xml($fh,$defdom,$dcname,$dcdom); print $output; + &unset_permissions(\%permissionflags); } } else { my @permissions = ('mau','ccc','cin','cta','cep','ccr','cst'); @@ -142,7 +149,7 @@ } } if ($settings->{'req'}) { - my $output = &Apache::process_official_reqs('auto',$dom); + my $output = &Apache::loncoursequeueadmin::process_official_reqs('auto',$dom); if ($output) { print $fh $output; }