--- loncom/interface/loncreatecourse.pm 2005/01/20 16:30:52 1.75
+++ loncom/interface/loncreatecourse.pm 2005/03/03 21:24:24 1.77
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Create a course
#
-# $Id: loncreatecourse.pm,v 1.75 2005/01/20 16:30:52 albertel Exp $
+# $Id: loncreatecourse.pm,v 1.77 2005/03/03 21:24:24 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -327,12 +327,15 @@ sub print_course_creation_page {
'pcda' => "Please choose the default authentication method to be used by new users added to this LON-CAPA domain by the automated enrollment process",
'nech' => "Notification of enrollment changes",
'nccl' => "Notification to course coordinator via LON-CAPA message when enrollment changes occur during the automated update?",
+ 'ndcl' => "Notification to domain coordinator via LON-CAPA message when enrollment changes occur during the automated update?",
'irsp' => "Include retrieval of student photographs?",
'rshm' => 'Resource Space Home',
'opco' => "Open Course"
);
+ my $html=&Apache::lonxml::xmlbegin();
$r->print(<
$lt{'nccl'}
+
+$lt{'ndcl'}
+
+
$lt{'irsp'}
@@ -547,11 +557,6 @@ $lt{'nccl'}
-
-
@@ -597,9 +602,10 @@ sub create_course {
}
my $logmsg;
+ my $html=&Apache::lonxml::xmlbegin();
my $bodytag=&Apache::loncommon::bodytag('Create a New Course');
$r->print(<
');
-#
-# Make additional user course administrator
+# Make the requested user a course coordinator
#
if (($ccdomain) && ($ccuname)) {
$r->print(&mt('Assigning role of course coordinator to').' '.
@@ -698,7 +696,7 @@ ENDENHEAD
}
sub construct_course {
- my ($args,$logmsg,$courseid,$crsudom,$crsunum) = @_;
+ my ($args,$logmsg,$courseid,$crsudom,$crsunum,$udom,$uname) = @_;
my $outcome;
#
@@ -822,10 +820,26 @@ sub construct_course {
if ($args->{'autodrops'}) {
$cenv{'internal.autodrops'}=$args->{'autodrops'};
}
- if ($args->{'notify'}) {
- if ($args->{'ccuname'}) {
- $cenv{'internal.notifylist'} = $args->{'ccuname'}.'@'.$args->{'ccdomain'};
- }
+# check for notification of enrollment changes
+ my @notified = ();
+ if ($args->{'notify_owner'}) {
+ if ($args->{'ccuname'} ne '') {
+ push(@notified,$args->{'ccuname'}.'@'.$args->{'ccdomain'});
+ }
+ }
+ if ($args->{'notify_dc'}) {
+ if ($uname ne '') {
+ push(@notified,$uname.'@'.$udom);
+ }
+ }
+ if (@notified > 0) {
+ my $notifylist;
+ if (@notified > 1) {
+ $notifylist = join(',',@notified);
+ } else {
+ $notifylist = $notified[0];
+ }
+ $cenv{'internal.notifylist'} = $notifylist;
}
if (@badclasses > 0) {
my %lt=&Apache::lonlocal::texthash(