--- loncom/auth/lonroles.pm 2017/02/20 18:29:28 1.326 +++ loncom/auth/lonroles.pm 2017/03/13 18:14:13 1.328 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.326 2017/02/20 18:29:28 raeburn Exp $ +# $Id: lonroles.pm,v 1.328 2017/03/13 18:14:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -674,7 +674,8 @@ ENDENTERKEY } } } - if ($dest =~ m{^\Q/public/$cdom/$cnum/syllabus\E.*(\?|\&)usehttp=1}) { + if (($dest =~ m{^\Q/public/$cdom/$cnum/syllabus\E.*(\?|\&)usehttp=1}) || + ($dest =~ m{^\Q/adm/wrapper/ext/\E(?!https:)})) { if ($ENV{'SERVER_PORT'} == 443) { my $hostname = $r->hostname(); if ($hostname ne '') { @@ -1734,9 +1735,11 @@ sub privileges_info { 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) { @@ -1797,7 +1800,7 @@ sub build_roletext { .''.$twhere.'' .''.$tpstart.'' .''.$tpend.''; - if (!$is_dc) { + unless ($poss_adhoc) { $roletext_end = ''. $tremark.' '. ''; @@ -1828,7 +1831,7 @@ sub check_for_adhoc { 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;