version 1.15, 2009/02/05 12:27:21
|
version 1.19, 2009/05/23 20:21:09
|
Line 404 sub has_role {
|
Line 404 sub has_role {
|
my $output; |
my $output; |
if ($curr_role{'status'} eq 'active') { |
if ($curr_role{'status'} eq 'active') { |
my $rolelink = &jump_to_role($curr_role{'role'}); |
my $rolelink = &jump_to_role($curr_role{'role'}); |
$output = &mt('You already have an active student role (section: "[_1]") in this course.',$curr_role{'section'}).'<br>'.$rolelink; |
$output = &mt('You already have an active student role (section: "[_1]") in this course.',$curr_role{'section'}).'<br />'.$rolelink; |
} elsif ($curr_role{'status'} eq 'future') { |
} elsif ($curr_role{'status'} eq 'future') { |
$output = &mt('You have a student role (section: "[_1]") in this course which will become active [_2].',$curr_role{'section'},$curr_role{'start'}); |
$output = &mt('You have a student role (section: "[_1]") in this course which will become active [_2].',$curr_role{'section'},$curr_role{'start'}); |
} |
} |
Line 550 sub store_selfenroll_request {
|
Line 550 sub store_selfenroll_request {
|
); |
); |
my $putresult = &Apache::lonnet::put($namespace,\%selfenroll,$cdom,$cnum); |
my $putresult = &Apache::lonnet::put($namespace,\%selfenroll,$cdom,$cnum); |
if ($putresult eq 'ok') { |
if ($putresult eq 'ok') { |
|
my %userenroll = ( |
|
$cdom.'_'.$cnum => { |
|
timestamp => $now, |
|
section => $usec, |
|
status => 'request', |
|
}); |
|
my $warning; |
|
my $userresult = &Apache::lonnet::put($namespace,\%userenroll,$udom,$uname); |
|
if ($userresult ne 'ok') { |
|
$warning = &mt('An error occurred saving a personal record of your request.'); |
|
} |
$output = &mt('Your request for self-enrollment has been recorded.').'<br />'. |
$output = &mt('Your request for self-enrollment has been recorded.').'<br />'. |
&mt('A message will be sent to your LON-CAPA account when the course coordinator takes action on your request').'<br />'; |
&mt('A message will be sent to your LON-CAPA account when the course coordinator takes action on your request.').'<br />'. |
|
&mt('To access your LON-CAPA email, go to the Main Menu and click on "Send and Receive Messages".').'<br />'; |
my %emails = &Apache::loncommon::getemails($uname,$udom); |
my %emails = &Apache::loncommon::getemails($uname,$udom); |
if (($emails{'permanentemail'} ne '') || ($emails{'notification'} ne '')) { |
if (($emails{'permanentemail'} ne '') || ($emails{'notification'} ne '')) { |
my $address = $emails{'permanentemail'}; |
my $address = $emails{'permanentemail'}; |
if ($address eq '') { |
if ($address eq '') { |
$address = $emails{'notification'}; |
$address = $emails{'notification'}; |
} |
} |
$output.= &mt('An e-mail will also be sent to: [_1] when this occurs.',$address); |
$output.= &mt('An e-mail will also be sent to: [_1] when this occurs.',$address).'<br />'; |
|
} |
|
if ($warning) { |
|
$output .= '<span class="LC_warning">'.$warning.'</span><br />'; |
} |
} |
|
|
if ($selfenroll_notifylist) { |
if ($selfenroll_notifylist) { |
my $fullname = &Apache::loncommon::plainname($uname,$udom); |
my $fullname = &Apache::loncommon::plainname($uname,$udom); |
my %courseinfo = &Apache::lonnet::coursedescription($cdom.'_'.$cnum); |
my %courseinfo = &Apache::lonnet::coursedescription($cdom.'_'.$cnum); |
Line 589 sub send_notification {
|
Line 605 sub send_notification {
|
$rawsubj = 'Self-enrollment requests processed'; |
$rawsubj = 'Self-enrollment requests processed'; |
push(@rawmsg,{ |
push(@rawmsg,{ |
mt => 'Enrollment requests in the following course: [_1] have been processed.', |
mt => 'Enrollment requests in the following course: [_1] have been processed.', |
args => [$coursedesc], |
args => ["\n$coursedesc\n"], |
}); |
}); |
} elsif ($context eq 'enroller') { |
} elsif ($context eq 'enroller') { |
$rawsubj = 'Enrollment request'; |
$rawsubj = 'Enrollment request'; |
push(@rawmsg,{ |
push(@rawmsg,{ |
mt => 'Your request for enrollment in the following course: [_1], requested on [_2], has been reviewed by a Course Coordinator.', |
mt => 'Your request for enrollment in the following course: [_1], requested on [_2], has been reviewed by a Course Coordinator.', |
args => [$coursedesc,$timestamp], |
args => ["\n$coursedesc\n","$timestamp\n"], |
|
|
}); |
}); |
if (ref($textstr) eq 'ARRAY') { |
if (ref($textstr) eq 'ARRAY') { |
push(@rawmsg,@{$textstr}); |
push(@rawmsg,@{$textstr}); |
Line 604 sub send_notification {
|
Line 621 sub send_notification {
|
$rawsubj = 'Self-enrollment request'; |
$rawsubj = 'Self-enrollment request'; |
push(@rawmsg,{ |
push(@rawmsg,{ |
mt => 'Enrollment in the following course: [_1] was requested by [_2] on [_3].', |
mt => 'Enrollment in the following course: [_1] was requested by [_2] on [_3].', |
args => [$coursedesc,$textstr,$timestamp], |
args => ["\n$coursedesc\n",$textstr,$timestamp], |
}, |
}, |
{ |
{ |
mt =>'As Course Coordinator, use Main Menu -> Manage Couse Users -> "Enrollment Requests" to display a list of pending enrollment requests which you can either approve or reject.' |
mt =>'As Course Coordinator, use: [_1]Main Menu -> Manage Course Users -> Enrollment Requests[_1] to display a list of pending enrollment requests,[_1] which you can either approve or reject.', |
|
args => ["\n"], |
}); |
}); |
} |
} |
my @to_notify = split(/,/,$notifylist); |
my @to_notify = split(/,/,$notifylist); |