--- loncom/interface/selfenroll.pm 2009/08/11 00:39:46 1.21 +++ loncom/interface/selfenroll.pm 2010/01/18 15:58:25 1.25.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network # Allow users to self-enroll in a course # -# $Id: selfenroll.pm,v 1.21 2009/08/11 00:39:46 raeburn Exp $ +# $Id: selfenroll.pm,v 1.25.2.1 2010/01/18 15:58:25 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -476,7 +476,7 @@ sub process_self_enroll { } &Apache::lonnet::standard_roleprivs(\%newrole,$role,$cdom,$spec,$cnum, $area); - &Apache::lonnet::set_userprivs(\%userroles,\%newrole,%newgroups); + &Apache::lonnet::set_userprivs(\%userroles,\%newrole,\%newgroups); $userroles{'user.role.'.$spec} = $selfenroll_access_start.'.'.$selfenroll_access_end; &Apache::lonnet::appenv(\%userroles,[$role,'cm']); $r->print('

'.&mt('Enrollment process complete').'

'); @@ -543,8 +543,8 @@ sub store_selfenroll_request { my %existing = &Apache::lonnet::get($namespace,[$uname.':'.$udom],$cdom,$cnum); if ($existing{$uname.':'.$udom}) { - my ($timestamp,$sec) = split(/:/,$existing{$uname.':'.$udom}); - $output = &mt('A self-enrollment request already exists for you for this course.').'
'.&mt('Your earlier request was submitted: [_1] and remains in a queue awaiting action by a Course Coordinator.',&Apache::lonlocal::locallocaltime($timestamp)); + $output = &mt('A self-enrollment request already exists for you for this course.').'
'.&mt('Your earlier request is in a queue awaiting action by a Course Coordinator.'). + '

'.&Apache::loncoursequeueadmin::queued_selfenrollment(); } else { my %selfenroll = ( $uname.':'.$udom => $now.':'.$usec, @@ -564,7 +564,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'}; @@ -576,12 +576,14 @@ sub store_selfenroll_request { if ($warning) { $output .= ''.$warning.'
'; } - + + $output .= '
'.&Apache::loncoursequeueadmin::queued_selfenrollment(); + if ($selfenroll_notifylist) { my $fullname = &Apache::loncommon::plainname($uname,$udom); my %courseinfo = &Apache::lonnet::coursedescription($cdom.'_'.$cnum); my $coursedesc = $courseinfo{'description'}; - &Apache::loncoursequeueadmin::send_selfserver_notification( + &Apache::loncoursequeueadmin::send_selfserve_notification( $selfenroll_notifylist,$fullname,$cdom.'_'.$cnum, $coursedesc,$now,'selfenrollreq',$owner); }