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

raeburn raeburn at source.lon-capa.org
Sat Oct 22 13:56:13 EDT 2016


raeburn		Sat Oct 22 17:56:13 2016 EDT

  Modified files:              
    /loncom/interface	loncreateuser.pm 
  Log:
  - Remove trailing whitespace. No code changes.
  
  
-------------- next part --------------
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.416 loncom/interface/loncreateuser.pm:1.417
--- loncom/interface/loncreateuser.pm:1.416	Mon Oct 10 03:02:48 2016
+++ loncom/interface/loncreateuser.pm	Sat Oct 22 17:56:12 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.416 2016/10/10 03:02:48 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.417 2016/10/22 17:56:12 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -533,13 +533,13 @@
 
 sub domadhocroles {
     my ($ccuname,$ccdomain) = @_;
-    my $confname = &Apache::lonnet::get_domainconfiguser($env{'request.role.domain'}); 
+    my $confname = &Apache::lonnet::get_domainconfiguser($env{'request.role.domain'});
     my %existing=&Apache::lonnet::dump('roles',$env{'request.role.domain'},
                                        $confname,'rolesdef_');
     my $output;
     if (keys(%existing) > 0) {
         my @current;
-        my $curradhoc = 'adhocroles.'.$env{'request.role.domain'}; 
+        my $curradhoc = 'adhocroles.'.$env{'request.role.domain'};
         my %userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,$curradhoc);
         if ($userenv{$curradhoc}) {
             @current = split(/,/,$userenv{$curradhoc});
@@ -560,7 +560,7 @@
                   &Apache::loncommon::start_data_table_header_row().
                   '<th>'.&mt('Action').'</th><th>'.&mt('Role').'</th>'.
                   '<th>'.&mt('Privileges in Course').'<th>'.
-                  &Apache::loncommon::end_data_table_header_row(); 
+                  &Apache::loncommon::end_data_table_header_row();
         foreach my $key (sort(keys(%customroles))) {
             $output .= &Apache::loncommon::start_data_table_row();
             if (grep(/^\Q$key\E$/, at current)) {
@@ -583,7 +583,7 @@
                     }
                     my @privs = split(/:/,$customroles{$key}{$level});
                     foreach my $item (@privs) {
-                        next if ($item eq ''); 
+                        next if ($item eq '');
                         my ($priv,$cond) = split(/\&/,$item);
                         $output .= &Apache::lonnet::plaintext($priv,'Course').$suffix.'<br />';
                     }
@@ -822,7 +822,7 @@
                 $actiontext = $lt{'srst'};
             }
         } elsif ($env{'form.action'} eq 'accesslogs') {
-            $actiontext = $lt{'srva'}; 
+            $actiontext = $lt{'srva'};
         }
         $r->print("<h3>$actiontext</h3>");
         if ($env{'form.origform'} ne 'crtusername') {
@@ -2798,7 +2798,7 @@
                     my @adds = &Apache::loncommon::get_env_multiple('form.adhocroleadd');
                     if (&adhocrole_changes(\%changeHash)) {
                         $changed{'adhocroles.'.$env{'request.role.domain'}} = $changeHash{'adhocroles.'.$env{'request.role.domain'}};
-                    }  
+                    }
                 }
             }
             if ($canmodify_status{'inststatus'}) {
@@ -3144,7 +3144,7 @@
             if (&adhocrole_changes(\%changeHash,\%userenv)) {
                 $changed{'adhocroles'} = 1;
                 $oldsettings{'adhocroles'} = $userenv{'adhocroles.'.$env{'request.role.domain'}};
-                $newsettings{'adhocroles'} = $changeHash{'adhocroles.'.$env{'request.role.domain'}}; 
+                $newsettings{'adhocroles'} = $changeHash{'adhocroles.'.$env{'request.role.domain'}};
             }
         }
         foreach my $item (@userinfo) {
@@ -3762,7 +3762,7 @@
                 @current = split(/,/,$userenv->{$adhoc_key});
                 if (@dels) {
                     foreach my $curr (@current) {
-                        next if ($curr eq ''); 
+                        next if ($curr eq '');
                         unless (grep(/\Q$curr\E$/, at dels)) {
                             push(@saved,$curr);
                         }
@@ -3800,7 +3800,7 @@
         push(@alladhoc, at saved);
     }
     if (@alladhoc) {
-        my $adhocstr = join(',',sort(@alladhoc)); 
+        my $adhocstr = join(',',sort(@alladhoc));
         $changehashref->{$adhoc_key} = $adhocstr;
     } elsif (@dels) {
         &Apache::lonnet::del('environment',[$adhoc_key],$env{'form.ccdomain'},$env{'form.ccuname'});
@@ -4379,7 +4379,7 @@
         ($privs{'system'},$privs{'domain'},$privs{'course'})=split(/\_/,$roledef);
         if ($privs{'system'} =~ /bre\&S/) {
             if ($context eq 'domain') {
-                $crstype = 'Course'; 
+                $crstype = 'Course';
             } elsif ($crstype eq 'Community') {
                 $privs{'system'} =~ s/bre\&S//;
             }
@@ -4394,7 +4394,7 @@
 
 # ------------------------------------------------------- What can be assigned?
     my %full=();
-    my %levels=( 
+    my %levels=(
                  course => {},
                  domain => {},
                  system => {},
@@ -4407,7 +4407,7 @@
     &Apache::lonuserutils::custom_role_privs(\%privs,\%full,\%levels,\%levelscurrent);
     my ($jsback,$elements) = &crumb_utilities();
     my @templateroles = &Apache::lonuserutils::custom_template_roles($context,$crstype);
-    my $head_script = 
+    my $head_script =
         &Apache::lonuserutils::custom_roledefs_js($context,$crstype,$formname,
                                                   \%full,\@templateroles,$jsback);
     push (@{$brcrum},
@@ -4439,7 +4439,7 @@
     $r->print(&Apache::loncommon::end_data_table().
    '<input type="hidden" name="action" value="'.$env{'form.action'}.'" />'.
    '<input type="hidden" name="startrolename" value="'.$env{'form.rolename'}.
-   '" />'."\n".'<input type="hidden" name="currstate" value="" />'."\n".   
+   '" />'."\n".'<input type="hidden" name="currstate" value="" />'."\n".
    '<input type="reset" value="'.&mt("Reset").'" />'."\n".
    '<input type="submit" value="'.&mt('Save').'" /></form>');
 }
@@ -5359,7 +5359,7 @@
         push(@{  $menu[0]->{items} }, # Single Users
             {
              linktext => 'User Access Log',
-             icon => 'document-properties.png',  
+             icon => 'document-properties.png',
              #help => 'User_Access_Logs',
              url => '/adm/createuser?action=accesslogs',
              permission => $permission->{'activity'},
@@ -6678,7 +6678,7 @@
     my $args = { bread_crumbs           => $brcrum,
                  bread_crumbs_component => 'User Management'};
 
-# set javascript 
+# set javascript
     my ($jsback,$elements) = &crumb_utilities();
     my $jsnav = &userlogdisplay_js($formname);
 
@@ -6694,7 +6694,7 @@
 
 ENDSCRIPT
 
-# print page header 
+# print page header
     $r->print(&header($jscript,$args));
 
 # early out unless log data can be displayed.
@@ -6711,7 +6711,7 @@
                  .&mt("User's domain must match role's domain")
                  .'</p>'
                  .&earlyout_accesslog_form($formname,$prevphasestr,$udom));
-        return;    
+        return;
     }
 
     if (($uname eq '') || ($udom eq '')) {
@@ -6836,7 +6836,7 @@
                     if ($rolecode eq 'au') {
                         $extra = '';
                     } elsif ($rolecode =~ /^(ca|aa)$/) {
-                        $extra = &mt('Authoring Space: [_1]',$name.':'.$dom); 
+                        $extra = &mt('Authoring Space: [_1]',$name.':'.$dom);
                     } elsif ($rolecode =~ /^(li|dg|dh|dc|sc)$/) {
                         $extra = &mt('Domain: [_1]',$dom);
                     }
@@ -6844,10 +6844,10 @@
                 my $rolename;
                 if ($rolecode =~ m{^cr/($match_domain)/($match_username)/(\w+)}) {
                     my $role = $3;
-                    my $owner = "($2:$1)"; 
+                    my $owner = "($2:$1)";
                     if ($2 eq $1.'-domainconfig') {
                         $owner = '(ad hoc)';
-                    } 
+                    }
                     $rolename = &mt('Custom role: [_1]',$role.' '.$owner);
                 } else {
                     $rolename = &Apache::lonnet::plaintext($rolecode,$crstype);
@@ -7195,7 +7195,7 @@
             $response .= '<br />';
         }
     } else {
-        unless (($context eq 'requestcrs') && ($srch->{'srchtype'} eq 'exact')) { 
+        unless (($context eq 'requestcrs') && ($srch->{'srchtype'} eq 'exact')) {
             my $domd_chk = &domdirectorysrch_check($srch);
             if ($domd_chk ne 'ok') {
                 my $instd_chk = &instdirectorysrch_check($srch);


More information about the LON-CAPA-cvs mailing list