version 1.27, 2011/03/07 02:13:02
|
version 1.29, 2011/11/30 12:31:00
|
Line 424 sub build_queue_display {
|
Line 424 sub build_queue_display {
|
} |
} |
unless ($context eq 'pending') { |
unless ($context eq 'pending') { |
$row = '<td><span class="LC_nobreak"><label>'. |
$row = '<td><span class="LC_nobreak"><label>'. |
'<input type="checkbox" value="'.$approve.'" name="approvereq" />'.&mt('Approve').'</label></span><br />'. |
'<input type="radio" value="'.$approve.'" name="'.$count.'radioreq" />'.&mt('Approve').'</label></span>'. |
'<span class="LC_nobreak"><label>'. |
'<span class="LC_nobreak"><label>'. |
'<input type="checkbox" value="'.$reject.'" name="rejectreq" />'.&mt('Reject').'</label></span><br /></td>'; |
'<input type="radio" value="'.$reject.'" name="'.$count.'radioreq" />'.&mt('Reject').'</label></span>'. |
|
'<input type="radio" value="'."later:".$reject.'" name="'.$count.'radioreq" checked />'.&mt('Decide Later'). |
|
'</label></span><br /></td>'; |
} |
} |
$row .= '<td>'.$namelink.'</td>'."\n"; |
$row .= '<td>'.$namelink.'</td>'."\n"; |
if ($context eq 'course') { |
if ($context eq 'course') { |
Line 461 sub update_request_queue {
|
Line 463 sub update_request_queue {
|
@processing_errors,@warn_approves,@warn_rejects,@approvals,@warn_dels, |
@processing_errors,@warn_approves,@warn_rejects,@approvals,@warn_dels, |
@rejections,@rejectionerrors,@nopermissions,%courseroles, |
@rejections,@rejectionerrors,@nopermissions,%courseroles, |
%communityroles,%domdefs,%approvalmsg,%rejectionmsg,$crstype,$queue,$firsturl); |
%communityroles,%domdefs,%approvalmsg,%rejectionmsg,$crstype,$queue,$firsturl); |
@approvals = &Apache::loncommon::get_env_multiple('form.approvereq'); |
my $count=0; |
@rejections = &Apache::loncommon::get_env_multiple('form.rejectreq'); |
while (my @course = &Apache::loncommon::get_env_multiple('form.'.$count.'radioreq')) { |
|
if (@course[0] =~ /^\d+:.*/) { |
|
push(@approvals,@course[0]); |
|
} elsif (@course[0] =~ /^later:.*/) { |
|
#decide later |
|
} else { |
|
push(@rejections,@course[0]); |
|
} |
|
$count+=1; |
|
} |
|
|
|
|
$now = time; |
$now = time; |
$sender = $env{'user.name'}.':'.$env{'user.domain'}; |
$sender = $env{'user.name'}.':'.$env{'user.domain'}; |
if ($context eq 'course') { |
if ($context eq 'course') { |
Line 482 sub update_request_queue {
|
Line 495 sub update_request_queue {
|
mt => 'Your request for enrollment has been approved.', |
mt => 'Your request for enrollment has been approved.', |
}, |
}, |
{ |
{ |
mt => 'Visit [_1], to log-in and access the course', |
mt => 'Visit [_1] to log-in and access the course', |
args => [$firsturl], |
args => [$firsturl], |
}]; |
}]; |
$rejectedmsg = [{ |
$rejectedmsg = [{ |
Line 497 sub update_request_queue {
|
Line 510 sub update_request_queue {
|
$queue = 'pending'; |
$queue = 'pending'; |
} |
} |
%requesthash = &Apache::lonnet::dump_dom($namespace,$cdom,'_'.$queue); |
%requesthash = &Apache::lonnet::dump_dom($namespace,$cdom,'_'.$queue); |
$firsturl= &course_portal_url($cnum,$cdom); |
|
my %domconfig = &Apache::lonnet::get_dom('configuration',['requestcourses'],$cdom); |
my %domconfig = &Apache::lonnet::get_dom('configuration',['requestcourses'],$cdom); |
if (ref($domconfig{'requestcourses'}) eq 'HASH') { |
if (ref($domconfig{'requestcourses'}) eq 'HASH') { |
if (ref($domconfig{'requestcourses'}{'notify'}) eq 'HASH') { |
if (ref($domconfig{'requestcourses'}{'notify'}) eq 'HASH') { |
Line 509 sub update_request_queue {
|
Line 521 sub update_request_queue {
|
mt => 'Your course request has been approved.', |
mt => 'Your course request has been approved.', |
}, |
}, |
{ |
{ |
mt => 'Visit [_1], to log-in and access the course', |
mt => 'Visit [_1] to log-in and access the course', |
args => [$firsturl], |
args => [], |
}]; |
}]; |
$rejectionmsg{'course'} = |
$rejectionmsg{'course'} = |
[{ |
[{ |
Line 522 sub update_request_queue {
|
Line 534 sub update_request_queue {
|
mt => 'Your community request has been approved.', |
mt => 'Your community request has been approved.', |
}, |
}, |
{ |
{ |
mt => 'Visit [_1], to log-in and access the community', |
mt => 'Visit [_1] to log-in and access the community', |
args => [$firsturl], |
args => [], |
}]; |
}]; |
|
|
$rejectionmsg{'community'} = |
$rejectionmsg{'community'} = |
Line 645 sub update_request_queue {
|
Line 657 sub update_request_queue {
|
} else { |
} else { |
$approvedmsg = $approvalmsg{'course'}; |
$approvedmsg = $approvalmsg{'course'}; |
} |
} |
|
my $firsturl = &course_portal_url($cnum,$cdom); |
|
if (ref($approvedmsg) eq 'ARRAY') { |
|
if (ref($approvedmsg->[1]) eq 'HASH') { |
|
$approvedmsg->[1]->{'args'} = [$firsturl]; |
|
} |
|
} |
push(@completed,$cnum); |
push(@completed,$cnum); |
|
|
unless (&Apache::lonnet::del_dom($namespace,[$cnum.'_'.$queue],$cdom) eq 'ok') { |
unless (&Apache::lonnet::del_dom($namespace,[$cnum.'_'.$queue],$cdom) eq 'ok') { |
Line 1432 sub process_official_reqs {
|
Line 1450 sub process_official_reqs {
|
args => [$cdescr], |
args => [$cdescr], |
}, |
}, |
{ |
{ |
mt => 'Visit [_1], to log-in and access the course.', |
mt => 'Visit [_1] to log-in and access the course.', |
args => [$firsturl], |
args => [$firsturl], |
}, |
}, |
{ |
{ |