--- loncom/interface/selfenroll.pm 2010/01/18 15:58:25 1.25.2.1
+++ loncom/interface/selfenroll.pm 2012/05/01 16:09:26 1.25.6.1
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Allow users to self-enroll in a course
#
-# $Id: selfenroll.pm,v 1.25.2.1 2010/01/18 15:58:25 raeburn Exp $
+# $Id: selfenroll.pm,v 1.25.6.1 2012/05/01 16:09:26 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -52,7 +52,7 @@ sub handler {
}
&Apache::lonacc::get_posted_cgi($r);
&Apache::lonlocal::get_language_handle($r);
- &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['courseid']);
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['courseid','usertype']);
my $js = &Apache::createaccount::catreturn_js();
my ($coursechk,$courseid) = &validate_course_id($env{'form.courseid'});
if ($coursechk ne 'ok') {
@@ -442,6 +442,9 @@ sub process_self_enroll {
if ($selfenroll_section eq 'none') {
$usec = '';
}
+ unless (($usec ne '') && ($env{'form.usertype'} eq 'new')) {
+ $usec = 'sp12';
+ }
if ($selfenroll_registered) {
my ($registered,$instsec,$message) = &check_registered($cdom,$cnum);
$usec = $instsec;
@@ -564,7 +567,7 @@ sub store_selfenroll_request {
}
$output = &mt('Your request for self-enrollment has been recorded.').'
'.
&mt('A message will be sent to your LON-CAPA account when the course coordinator takes action on your request.').'
'.
- &mt('To access your LON-CAPA message, go to the Main Menu and click on "Send and Receive Messages".');
+ &mt('To access your LON-CAPA message, go to the Main Menu and click on "Send and Receive Messages".').'
';
my %emails = &Apache::loncommon::getemails($uname,$udom);
if (($emails{'permanentemail'} ne '') || ($emails{'notification'} ne '')) {
my $address = $emails{'permanentemail'};
@@ -577,7 +580,7 @@ sub store_selfenroll_request {
$output .= ''.$warning.'
';
}
- $output .= '
'.&Apache::loncoursequeueadmin::queued_selfenrollment();
+ $output .= &Apache::loncoursequeueadmin::queued_selfenrollment();
if ($selfenroll_notifylist) {
my $fullname = &Apache::loncommon::plainname($uname,$udom);