--- loncom/interface/lonmodifycourse.pm	2005/04/07 06:56:23	1.16
+++ loncom/interface/lonmodifycourse.pm	2005/09/29 20:17:06	1.20
@@ -1,3 +1,8 @@
+# The LearningOnline Network with CAPA
+# automated enrollment course setup handler
+#
+# $Id: lonmodifycourse.pm,v 1.20 2005/09/29 20:17:06 albertel Exp $
+#
 # Copyright Michigan State University Board of Trustees
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -45,7 +50,7 @@ sub print_course_selection_page {
     );
                                                                                       
 # Determine the courses
-    my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1,'.','.');
+    my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.');
     &print_header($r,$tasklongref);
     $r->print(<<ENDBLOCK);
 <form action="/adm/modifycourse" method="post" name="cmod">
@@ -142,7 +147,6 @@ sub print_course_modification_page {
     } else {
         $ok_course = &check_course($dom,$course);
     }
-    print STDERR "Response was $ok_course for $dom,$course\n";
 
     unless ($ok_course eq 'ok') {
         &print_header($r,$tasklongref,'',\$javascript_validations);
@@ -227,8 +231,8 @@ all settings except course code, course
         my @roleinfo = split/:/,$_;
         if ( ($roleinfo[0] eq 'cc')  && ($roleinfo[2] eq $dom) )  {
             unless (grep/^$roleinfo[1]$/,@local_ccs) {
-                $active_cc = &LONCAPA::Enrollment::check_user_status($roleinfo[2],$roleinfo[1],$dom,$course,'cc');
-                if ($active_cc eq 'ok') {
+                $active_cc = &Apache::loncommon::check_user_status($roleinfo[2],$roleinfo[1],$dom,$course,'cc');
+                if ($active_cc eq 'active') {
                     push @local_ccs, $roleinfo[1];
                     $pname{$roleinfo[1]} = &Apache::loncommon::plainname($roleinfo[1],$roleinfo[2]);
                     $cc_status{$roleinfo[1]} = $lt{'actv'};
@@ -239,8 +243,8 @@ all settings except course code, course
     unless ( (grep/^$enrollvar{'courseowner'}$/,@local_ccs) || ($enrollvar{'courseowner'} eq '') )  {
         push @local_ccs, $enrollvar{'courseowner'};
         $pname{$enrollvar{'courseowner'}} =  &Apache::loncommon::plainname($enrollvar{'courseowner'},$dom);
-        $active_cc = &LONCAPA::Enrollment::check_user_status($dom,$enrollvar{'coursecode'},$dom,$course,'cc');
-        if ($active_cc eq 'ok') {
+        $active_cc = &Apache::loncommon::check_user_status($dom,$enrollvar{'coursecode'},$dom,$course,'cc');
+        if ($active_cc eq 'active') {
             $cc_status{$enrollvar{'courseowner'}} = $lt{'actv'};
         } else {
             $cc_status{$enrollvar{'courseowner'}} = $lt{'inac'};
@@ -702,7 +706,7 @@ ENDBASE
 
 sub check_course {
     my ($dom,$course) = @_;
-    my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1,'.','.');
+    my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.');
     foreach my $key (sort keys %courseIDs) {
         if ($key =~ m/^($dom)_(\w+)$/) {
             if ($2 eq $course) {