--- loncom/interface/loncreatecourse.pm 2004/12/03 22:29:17 1.72 +++ loncom/interface/loncreatecourse.pm 2004/12/07 01:31:17 1.73 @@ -1,7 +1,7 @@ # The LearningOnline Network # Create a course # -# $Id: loncreatecourse.pm,v 1.72 2004/12/03 22:29:17 albertel Exp $ +# $Id: loncreatecourse.pm,v 1.73 2004/12/07 01:31:17 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -691,9 +691,8 @@ ENDENHEAD my ($sec,$gp) = split/:/,$item; my $class = $ENV{'form.crscode'}.$sec; my $addcheck = &Apache::lonnet::auto_new_course($crsunum,$crsudom,$class,$cenv{'internal.courseowner'}); - if ($addcheck eq 'ok') { - $cenv{'internal.sectionnums'} .= $item.','; - } else { + $cenv{'internal.sectionnums'} .= $item.','; + unless ($addcheck eq 'ok') { push @badclasses, $class; } } @@ -714,9 +713,8 @@ ENDENHEAD foreach my $item (@xlists) { my ($xl,$gp) = split/:/,$item; my $addcheck = &Apache::lonnet::auto_new_course($crsunum,$crsudom,$xl,$cenv{'internal.courseowner'}); - if ($addcheck eq 'ok') { - $cenv{'internal.crosslistings'} .= $item.','; - } else { + $cenv{'internal.crosslistings'} .= $item.','; + unless ($addcheck eq 'ok') { push @badclasses, $xl; } } @@ -736,7 +734,7 @@ ENDENHEAD } if (@badclasses > 0) { my %lt=&Apache::lonlocal::texthash( - 'tclb' => 'The courses listed below have not been included as sections or crosslistings affiliated with your new LON-CAPA course. If automated course roster updates are enabled for this class, these particular sections/crosslistings will not contribute towards enrollment, because the user identified as the course owner for this LON-CAPA course', + 'tclb' => 'The courses listed below were included as sections or crosslistings affiliated with your new LON-CAPA course. However, if automated course roster updates are enabled for this class, these particular sections/crosslistings will not contribute towards enrollment, because the user identified as the course owner for this LON-CAPA course', 'dnhr' => 'does not have rights to access enrollment in these classes', 'adby' => 'as determined by the policies of your institution on access to official classlists' );