--- loncom/interface/selfenroll.pm 2010/03/22 20:11:22 1.26 +++ loncom/interface/selfenroll.pm 2012/05/16 21:19:39 1.27 @@ -1,7 +1,7 @@ # The LearningOnline Network # Allow users to self-enroll in a course # -# $Id: selfenroll.pm,v 1.26 2010/03/22 20:11:22 droeschl Exp $ +# $Id: selfenroll.pm,v 1.27 2012/05/16 21:19:39 droeschl Exp $ # # Copyright Michigan State University Board of Trustees # @@ -54,9 +54,11 @@ sub handler { &Apache::lonlocal::get_language_handle($r); &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['courseid']); my $js = &Apache::createaccount::catreturn_js(); - my ($coursechk,$courseid) = &validate_course_id($env{'form.courseid'}); - if ($coursechk ne 'ok') { - &page_header($r,$courseid,$js); + + my $courseid = Apache::lonnet::is_course($env{'form.courseid'}); + + unless ($courseid) { + &page_header($r,$env{'form.courseid'},$js); $r->print('