version 1.73, 2014/01/03 18:39:51
|
version 1.74, 2014/01/04 02:10:36
|
Line 3706 sub process_request {
|
Line 3706 sub process_request {
|
if (($code) || ((ref($postprocess) eq 'HASH') && |
if (($code) || ((ref($postprocess) eq 'HASH') && |
(($postprocess->{'createdweb'}) || ($postprocess->{'createdmsg'})))) { |
(($postprocess->{'createdweb'}) || ($postprocess->{'createdmsg'})))) { |
$output .= ¬ification_information($disposition,$env{'user.name'}.':'.$env{'user.domain'}, |
$output .= ¬ification_information($disposition,$env{'user.name'}.':'.$env{'user.domain'}, |
$cnum,$now,$code,$postprocess); |
$dom,$cnum,$now,$code,$postprocess); |
} |
} |
if ($code) { |
if ($code) { |
$reqhash{'code'} = $code; |
$reqhash{'code'} = $code; |
Line 3764 sub process_request {
|
Line 3764 sub process_request {
|
} |
} |
$output .= '<br />'. |
$output .= '<br />'. |
¬ification_information($disposition,$req_notifylist, |
¬ification_information($disposition,$req_notifylist, |
$cnum,$now); |
$dom,$cnum,$now); |
} else { |
} else { |
$reqstatus = 'domainerror'; |
$reqstatus = 'domainerror'; |
$reqhash{'disposition'} = $disposition; |
$reqhash{'disposition'} = $disposition; |
Line 3782 sub process_request {
|
Line 3782 sub process_request {
|
} else { |
} else { |
$output .= '<p>'.&mt('Your course request has been updated').'</p>'; |
$output .= '<p>'.&mt('Your course request has been updated').'</p>'; |
} |
} |
$output .= ¬ification_information($disposition,$req_notifylist,$cnum,$now); |
$output .= ¬ification_information($disposition,$req_notifylist,$dom,$cnum,$now); |
if ($disposition eq 'approval') { |
if ($disposition eq 'approval') { |
my $fullname = &Apache::loncommon::plainname($env{'user.name'}, |
my $fullname = &Apache::loncommon::plainname($env{'user.name'}, |
$env{'user.domain'}); |
$env{'user.domain'}); |
Line 3792 sub process_request {
|
Line 3792 sub process_request {
|
if ((ref($postprocess) eq 'HASH') && |
if ((ref($postprocess) eq 'HASH') && |
((ref($postprocess->{'queuedmsg'}) eq 'HASH') || ($postprocess->{'queuedweb'}))) { |
((ref($postprocess->{'queuedmsg'}) eq 'HASH') || ($postprocess->{'queuedweb'}))) { |
my $recipient = $env{'user.name'}.':'.$env{'user.domain'}; |
my $recipient = $env{'user.name'}.':'.$env{'user.domain'}; |
$output .= ¬ification_information($disposition,$recipient,$cnum,$now,undef,$postprocess); |
$output .= ¬ification_information($disposition,$recipient,$dom,$cnum,$now,undef,$postprocess); |
} |
} |
} |
} |
} |
} |
Line 3946 sub update_requestors_roles {
|
Line 3946 sub update_requestors_roles {
|
} |
} |
|
|
sub notification_information { |
sub notification_information { |
my ($disposition,$req_notifylist,$cnum,$now,$code,$postprocess) = @_; |
my ($disposition,$req_notifylist,$dom,$cnum,$now,$code,$postprocess) = @_; |
my %emails = &Apache::loncommon::getemails(); |
my %emails = &Apache::loncommon::getemails(); |
my $address; |
my $address; |
if (($emails{'permanentemail'} ne '') || ($emails{'notification'} ne '')) { |
if (($emails{'permanentemail'} ne '') || ($emails{'notification'} ne '')) { |
Line 3966 sub notification_information {
|
Line 3966 sub notification_information {
|
my $fullname = &Apache::loncommon::plainname($env{'user.name'}, |
my $fullname = &Apache::loncommon::plainname($env{'user.name'}, |
$env{'user.domain'}); |
$env{'user.domain'}); |
my $sender = $env{'user.name'}.':'.$env{'user.domain'}; |
my $sender = $env{'user.name'}.':'.$env{'user.domain'}; |
&Apache::loncoursequeueadmin::send_selfserve_notification($req_notifylist,"$fullname ($env{'user.name'}:$env{'user.domain'})",$cnum,$env{'form.cdescr'},$now,'coursereq',$sender); |
&Apache::loncoursequeueadmin::send_selfserve_notification($req_notifylist,"$fullname ($env{'user.name'}:$env{'user.domain'})", |
|
'undef',$env{'form.cdescr'},$now,'coursereq',$sender); |
} |
} |
if (ref($postprocess) eq 'HASH') { |
if (ref($postprocess) eq 'HASH') { |
if (ref($postprocess->{'queuedmsg'}) eq 'ARRAY') { |
if (ref($postprocess->{'queuedmsg'}) eq 'ARRAY') { |
Line 3982 sub notification_information {
|
Line 3983 sub notification_information {
|
} |
} |
} |
} |
if (scalar(@{$addmsg}) > 0) { |
if (scalar(@{$addmsg}) > 0) { |
&Apache::loncoursequeueadmin::send_selfserve_notification($recipient,$addmsg,$cnum, |
&Apache::loncoursequeueadmin::send_selfserve_notification($recipient,$addmsg,undef, |
$env{'form.cdescr'},$now, |
$env{'form.cdescr'},$now, |
'queuedreq',$sender); |
'queuedreq',$sender); |
} |
} |
Line 4006 sub notification_information {
|
Line 4007 sub notification_information {
|
my $sender = $recipient; |
my $sender = $recipient; |
if ($code) { |
if ($code) { |
push(@{$addmsg},{ |
push(@{$addmsg},{ |
mt => 'Students can automatically select your course by entering this code: [_1]', |
mt => 'Students can automatically select your course: "[_1]" by entering this code: [_2]', |
args => [$code], |
args => [$env{'form.cdescr'},$code], |
}); |
}); |
$output .= '<p>'. |
$output .= '<p>'. |
&mt('Students can automatically select your course by entering this code: [_1].','<b>'.$code.'</b>'). |
&mt('Students can automatically select your course by entering this code: [_1].','<b>'.$code.'</b>'). |
Line 4037 sub notification_information {
|
Line 4038 sub notification_information {
|
if ($code) { |
if ($code) { |
$type = 'uniquecode'; |
$type = 'uniquecode'; |
} |
} |
&Apache::loncoursequeueadmin::send_selfserve_notification($recipient,$addmsg,$cnum,$env{'form.cdescr'}, |
&Apache::loncoursequeueadmin::send_selfserve_notification($recipient,$addmsg,$dom.'_'.$cnum,$env{'form.cdescr'}, |
$now,$type,$sender); |
$now,$type,$sender); |
} |
} |
} |
} |