--- loncom/auth/lonroles.pm 2022/10/19 00:03:11 1.368
+++ loncom/auth/lonroles.pm 2023/10/17 14:43:03 1.371
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.368 2022/10/19 00:03:11 raeburn Exp $
+# $Id: lonroles.pm,v 1.371 2023/10/17 14:43:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -444,6 +444,12 @@ sub handler {
$reqauthor = &Apache::loncoursequeueadmin::process_reqauthor(\$update);
}
+# ------------------------------------------------- Check for approval results
+ my $approvalresult;
+ if (($env{'form.approvals'} eq 'show') && ($env{'form.state'} eq 'done')) {
+ $approvalresult = &Apache::loncoursequeueadmin::update_request_queue('othdombyuser',
+ $env{'user.domain'});
+ }
my $envkey;
my %dcroles = ();
my %helpdeskroles = ();
@@ -1233,7 +1239,7 @@ ENDCLOSE
} else {
my $crumbsright;
unless (($norolelist) && ((split(/:/,$env{'user.error.msg'}))[2])) {
- $funcs = &get_roles_functions($showcount,$cattype);
+ $funcs = &get_roles_functions($showcount,$cattype,$domdefs{'userapprovals'});
if ($env{'browser.mobile'}) {
$crumbsright = $funcs;
undef($funcs);
@@ -1271,7 +1277,11 @@ function enterrole (thisform,rolecode,bu
}
function rolesView (caller) {
- if ((caller == 'showall') || (caller == 'noshowall')) {
+ if (caller == 'approvals') {
+ document.rolechoice.approvals.value = 'show';
+ } else if (caller == 'noapprovals') {
+ document.rolechoice.approvals.value = 'hide';
+ } else if ((caller == 'showall') || (caller == 'noshowall')) {
document.rolechoice.display.value = caller;
} else {
if ((caller == 'doupdate') || (caller == 'requestauthor') ||
@@ -1367,22 +1377,31 @@ ENDHEADER
}
if ($hotlist) {
$showresult .= $hotlist;
- }
+ }
$showresult .= '';
$r->print($showresult);
} elsif ($env{'form.state'} eq 'queued') {
$r->print(&get_queued());
+ } elsif ($env{'form.approvals'} eq 'show') {
+ if ($env{'form.state'} eq 'done') {
+ $r->print($approvalresult).'
';
+ }
+ $r->print('