[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm loncreateuser.pm /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Sat Jan 28 18:26:52 EST 2017


raeburn		Sat Jan 28 23:26:52 2017 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm loncreateuser.pm 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Fix quotes.
  - Use shorter identifiers for ad hoc role restrictions (dh and da) for
    Domain Helpdesk (dh role) and Domain Helpdesk Assistant (da role).
  
  
-------------- next part --------------
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.291 loncom/interface/domainprefs.pm:1.292
--- loncom/interface/domainprefs.pm:1.291	Sat Jan 28 21:35:49 2017
+++ loncom/interface/domainprefs.pm	Sat Jan 28 23:26:46 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.291 2017/01/28 21:35:49 raeburn Exp $
+# $Id: domainprefs.pm,v 1.292 2017/01/28 23:26:46 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3250,7 +3250,7 @@
         my $context = 'domprefs';
         my $crstype = 'Course';
         my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom);
-        my @accesstypes = ('all','anydh','anyda','none');
+        my @accesstypes = ('all','dh','da','none');
         my ($numstatustypes, at jsarray);
         if (ref($types) eq 'ARRAY') {
             if (@{$types} > 0) {
@@ -3468,7 +3468,7 @@
                 shown = Array('notinc');
                 hidden = Array('notexc','bystatus');
             }
-            if ((curraccess == 'all') || (curraccess == 'anydh') || (curraccess == 'anyda'))  {
+            if ((curraccess == 'all') || (curraccess == 'dh') || (curraccess == 'da'))  {
                 hidden = Array('notinc','notexc','bystatus');
             }
         }
@@ -3525,9 +3525,9 @@
     my %lt = &Apache::lonlocal::texthash(
                     'rou'    => 'Role usage',
                     'whi'    => 'Which helpdesk personnel may use this role?',
-                    'all'    => "All with domain helpdesk or helpdesk assistant role',
-                    'anydh'  => "All with domain helpdesk role',
-                    'anyda'  => "All with domain helpdesk assistant role',
+                    'all'    => 'All with domain helpdesk or helpdesk assistant role',
+                    'dh'     => 'All with domain helpdesk role',
+                    'da'     => 'All with domain helpdesk assistant role',
                     'none'   => 'None',
                     'status' => 'Determined based on institutional status',
                     'inc'    => 'Include all, but exclude specific personnel',
@@ -12459,7 +12459,7 @@
     my %existing=&Apache::lonnet::dump('roles',$dom,$confname,'rolesdef_');
     my (@allpos,%newsettings,%changedprivs,$newrole);
     my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom);
-    my @accesstypes = ('all','anydh','anyda','none','status','inc','exc');
+    my @accesstypes = ('all','dh','da','none','status','inc','exc');
     my %domhelpdesk = &Apache::lonnet::get_active_domroles($dom,['dh','da']);
     my %lt = &Apache::lonlocal::texthash(
                     s      => 'system',
@@ -12467,8 +12467,8 @@
                     order  => 'Display order',
                     access => 'Role usage',
                     all    => 'All with domain helpdesk or helpdesk assistant role',
-                    anydh  => 'All with domain helpdesk role',
-                    anyda  => 'All with domain helpdesk assistant role',
+                    dh     => 'All with domain helpdesk role',
+                    da     => 'All with domain helpdesk assistant role',
                     none   => 'None',
                     status => 'Determined based on institutional status',
                     inc    => 'Include all, but exclude specific personnel',
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.433 loncom/interface/loncreateuser.pm:1.434
--- loncom/interface/loncreateuser.pm:1.433	Sat Jan 28 21:35:49 2017
+++ loncom/interface/loncreateuser.pm	Sat Jan 28 23:26:46 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.433 2017/01/28 21:35:49 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.434 2017/01/28 23:26:46 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7207,7 +7207,7 @@
     my $confname = $cdom.'-domainconfig';
     my $crstype = &Apache::loncommon::course_type();
 
-    my @accesstypes = ('all','anydh','anyda','none');
+    my @accesstypes = ('all','dh','da','none');
     my ($numstatustypes, at jsarray);
     my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($cdom);
     if (ref($types) eq 'ARRAY') {
@@ -7417,8 +7417,8 @@
                     'whi'    => 'Which helpdesk personnel may use this role?',
                     'udd'    => 'Use domain default',
                     'all'    => 'All with domain helpdesk or helpdesk assistant role',
-                    'anydh'  => 'All with domain helpdesk role',
-                    'anyda'  => 'All with domain helpdesk assistant role',
+                    'dh'     => 'All with domain helpdesk role',
+                    'da'     => 'All with domain helpdesk assistant role',
                     'none'   => 'None',
                     'status' => 'Determined based on institutional status',
                     'inc'    => 'Include all, but exclude specific personnel',
@@ -7661,9 +7661,9 @@
                 }
             } elsif ($access eq 'none') {
                 $domusage{$role} = &mt('No one in the domain');
-            } elsif ($access eq 'anydh') {
+            } elsif ($access eq 'dh') {
                 $domusage{$role} = &mt('Any user in domain with active [_1] role',&Apache::lonnet::plaintext('dh'));
-            } elsif ($access eq 'anyda') {
+            } elsif ($access eq 'da') {
                 $domusage{$role} = &mt('Any user in domain with active [_1] role',&Apache::lonnet::plaintext('da'));
             } elsif ($access eq 'all') {
                 $domusage{$role} = &mt('Any user in domain with active [_1] or [_2] role',
@@ -7852,7 +7852,7 @@
         $r->print('<p class="LC_error">'.&mt('You do not have permission to change helpdesk access.').'</p>');
         return;
     }
-    my @accesstypes = ('all','anydh','anyda','none','status','inc','exc');
+    my @accesstypes = ('all','dh','da','none','status','inc','exc');
     my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
     my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
     my $confname = $cdom.'-domainconfig';
@@ -8103,10 +8103,10 @@
                         if ($env{'form.'.$role.'_incrs'}) {
                             if ($newsettings{$role}{'access'} eq 'all') {
                                 $r->print(&mt('All helpdesk staff can access '.lc($crstype).' with this role.'));
-                            } elsif ($newsettings{$role}{'access'} eq 'anydh') {
+                            } elsif ($newsettings{$role}{'access'} eq 'dh') {
                                 $r->print(&mt('Helpdesk staff can use this role if they have an active [_1] role',
                                               &Apache::lonnet::plaintext('dh')));
-                            } elsif ($newsettings{$role}{'access'} eq 'anyda') {
+                            } elsif ($newsettings{$role}{'access'} eq 'da') {
                                 $r->print(&mt('Helpdesk staff can use this role if they have an active [_1] role',
                                               &Apache::lonnet::plaintext('da')));
                             } elsif ($newsettings{$role}{'access'} eq 'none') {
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1335 loncom/lonnet/perl/lonnet.pm:1.1336
--- loncom/lonnet/perl/lonnet.pm:1.1335	Sat Jan 28 21:35:54 2017
+++ loncom/lonnet/perl/lonnet.pm	Sat Jan 28 23:26:51 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1335 2017/01/28 21:35:54 raeburn Exp $
+# $Id: lonnet.pm,v 1.1336 2017/01/28 23:26:51 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4624,13 +4624,13 @@
                                     next;
                                 } elsif ($curraccess eq 'all') {
                                     push(@possroles,$role);
-                                } elsif ($curraccess eq 'anydh') {
+                                } elsif ($curraccess eq 'dh') {
                                     if (grep(/^dh$/, at liveroles)) {
                                         push(@possroles,$role);
                                     } else {
                                         next;
                                     }
-                                } elsif ($curraccess eq 'anyda') {
+                                } elsif ($curraccess eq 'da') {
                                     if (grep(/^da$/, at liveroles)) {
                                         push(@possroles,$role);
                                     } else {


More information about the LON-CAPA-cvs mailing list