[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm
raeburn
raeburn at source.lon-capa.org
Mon Mar 13 14:14:14 EDT 2017
raeburn Mon Mar 13 18:14:14 2017 EDT
Modified files:
/loncom/auth lonroles.pm
Log:
- Eliminate empty row between role itself and ad hoc role selection link
for Domain Helpdesk and Domain Helpdesk Assistant roles.
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.327 loncom/auth/lonroles.pm:1.328
--- loncom/auth/lonroles.pm:1.327 Wed Mar 8 02:51:13 2017
+++ loncom/auth/lonroles.pm Mon Mar 13 18:14:13 2017
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.327 2017/03/08 02:51:13 raeburn Exp $
+# $Id: lonroles.pm,v 1.328 2017/03/13 18:14:13 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1735,9 +1735,11 @@
sub build_roletext {
my ($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$trole,$twhere,
$tpstart,$tpend,$nochoose,$button,$switchserver,$reinit,$switchwarning,$skipcal) = @_;
- my ($roletext,$roletext_end);
- my $is_dc=($trolecode =~ m/^dc\./);
- my $rowspan=($is_dc) ? ''
+ my ($roletext,$roletext_end,$poss_adhoc);
+ if ($trolecode =~ m/^d(c|h|a)\./) {
+ $poss_adhoc = 1;
+ }
+ my $rowspan=($poss_adhoc) ? ''
: ' rowspan="2" ';
unless ($nochoose) {
@@ -1798,7 +1800,7 @@
.'<td>'.$twhere.'</td>'
.'<td>'.$tpstart.'</td>'
.'<td>'.$tpend.'</td>';
- if (!$is_dc) {
+ unless ($poss_adhoc) {
$roletext_end = '<td colspan="4">'.
$tremark.' '.
'</td>';
@@ -1829,7 +1831,7 @@
my $numhelpdesk = 0;
my $numadhoc = 0;
my $num_custom_adhoc = 0;
- if ($env{'user.adv'}) {
+ if (($env{'user.adv'}) || ($env{'user.rar'})) {
foreach my $envkey (sort(keys(%env))) {
if ($envkey=~/^user\.role\.(dc|dh|da)\.\/($match_domain)\/$/) {
my $role = $1;
More information about the LON-CAPA-cvs
mailing list