version 1.69, 2013/12/24 19:15:11
|
version 1.71, 2013/12/25 20:43:46
|
Line 3244 sub display_navbuttons {
|
Line 3244 sub display_navbuttons {
|
sub print_request_outcome { |
sub print_request_outcome { |
my ($dom,$codetitles,$code_order,$instcredits) = @_; |
my ($dom,$codetitles,$code_order,$instcredits) = @_; |
my ($output,$cnum,$now,$req_notifylist,$crstype,$enrollstart,$enrollend, |
my ($output,$cnum,$now,$req_notifylist,$crstype,$enrollstart,$enrollend, |
%sections,%crosslistings,%personnel,@baduname,@missingdom,%domconfig); |
%sections,%crosslistings,%personnel,@baduname,@missingdom,%domconfig, |
|
$uniquecode); |
my $sectotal = $env{'form.sectotal'}; |
my $sectotal = $env{'form.sectotal'}; |
my $crosslisttotal = 0; |
my $crosslisttotal = 0; |
$cnum = $env{'form.cnum'}; |
$cnum = $env{'form.cnum'}; |
Line 3258 sub print_request_outcome {
|
Line 3259 sub print_request_outcome {
|
if (ref($domconfig{'requestcourses'}{'notify'}) eq 'HASH') { |
if (ref($domconfig{'requestcourses'}{'notify'}) eq 'HASH') { |
$req_notifylist = $domconfig{'requestcourses'}{'notify'}{'approval'}; |
$req_notifylist = $domconfig{'requestcourses'}{'notify'}{'approval'}; |
} |
} |
|
$uniquecode = $domconfig{'requestcourses'}{'uniquecode'}; |
} |
} |
$now = time; |
$now = time; |
$crstype = $env{'form.crstype'}; |
$crstype = $env{'form.crstype'}; |
Line 3467 sub print_request_outcome {
|
Line 3469 sub print_request_outcome {
|
crstype => $env{'form.crstype'}, |
crstype => $env{'form.crstype'}, |
instcode => $instcode, |
instcode => $instcode, |
defaultcredits => $credits, |
defaultcredits => $credits, |
|
uniquecode => $uniquecode, |
clonedom => $clonedom, |
clonedom => $clonedom, |
clonecrs => $clonecrs, |
clonecrs => $clonecrs, |
datemode => $env{'form.datemode'}, |
datemode => $env{'form.datemode'}, |
Line 3558 sub print_request_outcome {
|
Line 3561 sub print_request_outcome {
|
$storeresult = 'rejected'; |
$storeresult = 'rejected'; |
} elsif ($disposition eq 'process') { |
} elsif ($disposition eq 'process') { |
my %domdefs = &Apache::lonnet::get_domain_defaults($dom); |
my %domdefs = &Apache::lonnet::get_domain_defaults($dom); |
my ($logmsg,$newusermsg,$addresult,$enrollcount,$response,$keysmsg,%longroles); |
my ($logmsg,$newusermsg,$addresult,$enrollcount,$response,$keysmsg,%longroles,$code); |
my $type = 'Course'; |
my $type = 'Course'; |
if ($crstype eq 'community') { |
if ($crstype eq 'community') { |
$type = 'Community'; |
$type = 'Community'; |
Line 3569 sub print_request_outcome {
|
Line 3572 sub print_request_outcome {
|
} |
} |
my $result = &Apache::loncoursequeueadmin::course_creation($dom,$cnum, |
my $result = &Apache::loncoursequeueadmin::course_creation($dom,$cnum, |
'autocreate',$details,\$logmsg,\$newusermsg,\$addresult, |
'autocreate',$details,\$logmsg,\$newusermsg,\$addresult, |
\$enrollcount,\$response,\$keysmsg,\%domdefs,\%longroles); |
\$enrollcount,\$response,\$keysmsg,\%domdefs,\%longroles,\$code); |
if ($result eq 'created') { |
if ($result eq 'created') { |
$disposition = 'created'; |
$disposition = 'created'; |
$reqstatus = 'created'; |
$reqstatus = 'created'; |
Line 3580 sub print_request_outcome {
|
Line 3583 sub print_request_outcome {
|
} else { |
} else { |
$output = '<p>'.&mt('Your course request has been processed and the course has been created.'); |
$output = '<p>'.&mt('Your course request has been processed and the course has been created.'); |
} |
} |
|
if ($code) { |
|
$output .= ¬ification_information($disposition,$env{'user.name'}.':'.$env{'user.domain'}, |
|
$cnum,$now,$code); |
|
} |
$output .= '<br />'.$role_result.'</p>'; |
$output .= '<br />'.$role_result.'</p>'; |
$creationresult = 'created'; |
$creationresult = 'created'; |
} else { |
} else { |
Line 3803 sub update_requestors_roles {
|
Line 3810 sub update_requestors_roles {
|
} |
} |
|
|
sub notification_information { |
sub notification_information { |
my ($disposition,$req_notifylist,$cnum,$now) = @_; |
my ($disposition,$req_notifylist,$cnum,$now,$code) = @_; |
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 3831 sub notification_information {
|
Line 3838 sub notification_information {
|
&mt("Usually this means that your institution's information systems do not list you among the instructional personnel for this course.").'<br />'. |
&mt("Usually this means that your institution's information systems do not list you among the instructional personnel for this course.").'<br />'. |
&mt('The list of instructional personnel for the course will be automatically checked daily, and once you are listed the request will be processed.'). |
&mt('The list of instructional personnel for the course will be automatically checked daily, and once you are listed the request will be processed.'). |
'</div>'; |
'</div>'; |
|
} elsif (($disposition eq 'created') && ($code)) { |
|
my $codemsg = [{ |
|
mt => 'Students can automatically select your course by entering this code: [_1]', |
|
args => [$code], |
|
}]; |
|
$output .= '<p>'. |
|
&mt('Students can automatically select your course by entering this code: [_1].','<b>'.$code.'</b>'). |
|
'<br />'. |
|
&mt('A message has been sent to your LON-CAPA account with this information.'); |
|
if ($address ne '') { |
|
$output.= '<br />'.&mt('And an e-mail has also been sent to: [_1] with this code.',$address); |
|
} |
|
$output .= '</p>'; |
|
my $sender = $env{'user.name'}.':'.$env{'user.domain'}; |
|
if ($code) { |
|
&Apache::loncoursequeueadmin::send_selfserve_notification($req_notifylist,$codemsg,$cnum,$env{'form.cdescr'}, |
|
$now,'uniquecode',$sender); |
|
} |
} else { |
} else { |
$output .= '<div class="LC_warning">'. |
$output .= '<div class="LC_warning">'. |
&mt('Your request status is: [_1].',$disposition). |
&mt('Your request status is: [_1].',$disposition). |