--- loncom/interface/selfenroll.pm 2012/05/01 16:09:26 1.25.6.1 +++ loncom/interface/selfenroll.pm 2012/05/25 03:04:59 1.27.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network # Allow users to self-enroll in a course # -# $Id: selfenroll.pm,v 1.25.6.1 2012/05/01 16:09:26 raeburn Exp $ +# $Id: selfenroll.pm,v 1.27.2.1 2012/05/25 03:04:59 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -52,11 +52,13 @@ sub handler { } &Apache::lonacc::get_posted_cgi($r); &Apache::lonlocal::get_language_handle($r); - &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['courseid','usertype']); + &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('