[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm

raeburn raeburn at source.lon-capa.org
Sat Jan 21 14:58:05 EST 2017


raeburn		Sat Jan 21 19:58:05 2017 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
  Log:
  - Ad hoc roles for helpdesk personnel
   - all custom ad hoc roles for helpdesk personnel are unavailable in "official"
     courses in which user is a registered student (automated enrollment in use).
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.323 loncom/auth/lonroles.pm:1.324
--- loncom/auth/lonroles.pm:1.323	Mon Jan  2 19:44:11 2017
+++ loncom/auth/lonroles.pm	Sat Jan 21 19:58:05 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.323 2017/01/02 19:44:11 raeburn Exp $
+# $Id: lonroles.pm,v 1.324 2017/01/21 19:58:05 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -311,7 +311,7 @@
             my $cnum = $3;
             my $sec = $4;
             if ($custom_adhoc) {
-                my ($possroles,$description) = &Apache::lonnet::get_my_adhocroles($cdom.'_'.$cnum);
+                my ($possroles,$description) = &Apache::lonnet::get_my_adhocroles($cdom.'_'.$cnum,1);
                 if (ref($possroles) eq 'ARRAY') {
                     if (grep(/^\Q$rolename\E$/,@{$possroles})) { 
                         if (&Apache::lonnet::check_adhoc_privs($cdom,$cnum,$update,$refresh,$now,
@@ -397,7 +397,7 @@
 # Is this an ad hoc custom role in a course/community?
                     if (my ($domain,$rolename,$coursenum,$sec) = ($envkey =~ m{^form\.cr/($match_domain)/\1\-domainconfig/(\w+)\./\1/($match_courseid)(?:/(\w+)|$)})) {
                         if ($dhroles{$domain}) {
-                            my ($possroles,$description) = &Apache::lonnet::get_my_adhocroles($domain.'_'.$coursenum);
+                            my ($possroles,$description) = &Apache::lonnet::get_my_adhocroles($domain.'_'.$coursenum,1);
                             if (ref($possroles) eq 'ARRAY') {
                                 if (grep(/^\Q$rolename\E$/,@{$possroles})) {
                                     if (&Apache::lonnet::check_adhoc_privs($domain,$coursenum,$update,$refresh,$now,




More information about the LON-CAPA-cvs mailing list