version 1.27, 2008/07/02 18:44:16
|
version 1.28, 2009/08/08 19:55:15
|
Line 370 sub parse_coursereqs {
|
Line 370 sub parse_coursereqs {
|
# build_course() |
# build_course() |
# |
# |
# inputs |
# inputs |
# domain |
# course domain |
# course request number |
# course request number |
# context - auto if called from command line, web if called from DC web interface |
# context - auto if called from command line, web if called from DC web interface |
# ref to hash of course creation information |
# ref to hash of course creation information |
Line 379 sub parse_coursereqs {
|
Line 379 sub parse_coursereqs {
|
# ref to scalar used to accumulate messages sent to new users |
# ref to scalar used to accumulate messages sent to new users |
# ref to scalar used to accumulate results of new user additions |
# ref to scalar used to accumulate results of new user additions |
# ref to hash of enrollment counts for different roles |
# ref to hash of enrollment counts for different roles |
# ref to scalar used to accumulate iformation about added roles |
# ref to scalar used to accumulate information about added roles |
# ref to scalar used to accumulate |
# ref to scalar used to accumulate |
|
# ref to scalar used to accumulate information about access keys |
|
# domain of DC creating course |
|
# username of DC creating course |
|
# optional course number, if unique course number already obtained (e.g., for |
|
# course requests submitted via course request form. |
# |
# |
# outputs |
# outputs |
# LON-CAPA courseID for new (created) course |
# LON-CAPA courseID for new (created) course |
Line 388 sub parse_coursereqs {
|
Line 393 sub parse_coursereqs {
|
######################################################### |
######################################################### |
|
|
sub build_course { |
sub build_course { |
my ($cdom,$num,$context,$details,$longroles,$logmsg,$newusermsg,$addresult,$enrollcount,$output,$keysmsg,$udom,$uname) = @_; |
my ($cdom,$num,$context,$details,$longroles,$logmsg,$newusermsg,$addresult,$enrollcount,$output,$keysmsg,$udom,$uname,$cnum) = @_; |
my $owner_uname = $$details{$num}{'owner'}; |
my $owner_uname = $$details{$num}{'owner'}; |
my $owner_domain = $$details{$num}{'domain'}; |
my $owner_domain = $$details{$num}{'domain'}; |
my $owner = $owner_uname.':'.$owner_domain; |
my $owner = $owner_uname.':'.$owner_domain; |
Line 504 sub build_course {
|
Line 509 sub build_course {
|
$$logmsg .= &mt('Invalid home server for course').': '.$$details{$num}{'coursehome'}; |
$$logmsg .= &mt('Invalid home server for course').': '.$$details{$num}{'coursehome'}; |
return; |
return; |
} |
} |
my ($success, $msg) = &Apache::loncommon::construct_course($courseargs,$logmsg,\$courseid,\$crsudom,\$crsunum,$udom,$uname,$context); |
my ($success, $msg) = &Apache::loncommon::construct_course($courseargs,$logmsg,\$courseid,\$crsudom,\$crsunum,$udom,$uname,$context,$cnum); |
$$logmsg .= $msg; |
$$logmsg .= $msg; |
if (!$success) { |
if (!$success) { |
return; |
return; |