Diff for /loncom/interface/loncreateuser.pm between versions 1.406.2.12 and 1.406.2.13

version 1.406.2.12, 2017/01/30 18:37:34 version 1.406.2.13, 2017/03/26 23:33:46
Line 749  sub print_username_entry_form { Line 749  sub print_username_entry_form {
         }          }
     } else {      } else {
         my $actiontext = $lt{'srad'};          my $actiontext = $lt{'srad'};
           my $fixeddom;
         if ($env{'form.action'} eq 'singlestudent') {          if ($env{'form.action'} eq 'singlestudent') {
             if ($crstype eq 'Community') {              if ($crstype eq 'Community') {
                 $actiontext = $lt{'srme'};                  $actiontext = $lt{'srme'};
Line 757  sub print_username_entry_form { Line 758  sub print_username_entry_form {
             }              }
         } elsif ($env{'form.action'} eq 'accesslogs') {          } elsif ($env{'form.action'} eq 'accesslogs') {
             $actiontext = $lt{'srva'};              $actiontext = $lt{'srva'};
               $fixeddom = 1;
         } elsif (($env{'form.action'} eq 'singleuser') &&          } elsif (($env{'form.action'} eq 'singleuser') &&
                  ($context eq 'domain') && (!&Apache::lonnet::allowed('mau',$defdom))) {                   ($context eq 'domain') && (!&Apache::lonnet::allowed('mau',$defdom))) {
             $actiontext = $lt{'srvu'};              $actiontext = $lt{'srvu'};
Line 768  sub print_username_entry_form { Line 770  sub print_username_entry_form {
                          '<br clear="all" />');                           '<br clear="all" />');
             }              }
         }          }
         $r->print(&entry_form($defdom,$srch,$forcenewuser,$context,$response,$crstype,1));          $r->print(&entry_form($defdom,$srch,$forcenewuser,$context,$response,$crstype,$fixeddom));
     }      }
 }  }
   
Line 6753  ENDSCRIPT Line 6755  ENDSCRIPT
         return;          return;
     }      }
   
       if (&Apache::lonnet::privileged($uname,$udom,
                                       [$env{'request.role.domain'}],['dc','su'])) {
           unless (&Apache::lonnet::privileged($env{'user.name'},$env{'user.domain'},
                                               [$env{'request.role.domain'}],['dc','su'])) {
               $r->print('<p class="LC_warning">'
                    .&mt('You need to be a privileged user to display user access logs for [_1]',
                         &Apache::loncommon::aboutmewrapper(&Apache::loncommon::plainname($uname,$udom),
                                                            $uname,$udom))
                    .'</p>');
               if ($env{'form.popup'}) {
                   $r->print('<p><a href="javascript:window.close()">'.&mt('Close window').'</a></p>');
               } else {
                   $r->print(&earlyout_accesslog_form($formname,$prevphasestr,$udom));
               }
               return;
           }
       }
   
 # set defaults  # set defaults
     my $now = time();      my $now = time();
     my $defstart = $now - (7*24*3600);      my $defstart = $now - (7*24*3600);
Line 6839  ENDSCRIPT Line 6859  ENDSCRIPT
                 $showntableheader = 1;                  $showntableheader = 1;
             }              }
             my ($shown,$extra);              my ($shown,$extra);
             my ($event,$data) = split(/\s+/,&unescape($event));              my ($event,$data) = split(/\s+/,&unescape($event),2);
             if ($event eq 'Role') {              if ($event eq 'Role') {
                 my ($rolecode,$extent) = split(/\./,$data,2);                  my ($rolecode,$extent) = split(/\./,$data,2);
                 next if ($extent eq '');                  next if ($extent eq '');
Line 6891  ENDSCRIPT Line 6911  ENDSCRIPT
                 $shown = &mt('Role selection: [_1]',$rolename);                  $shown = &mt('Role selection: [_1]',$rolename);
             } else {              } else {
                 $shown = &mt($event);                  $shown = &mt($event);
                 if ($data ne '') {                  if ($data =~ /^webdav/) {
                    $extra = &mt('Client IP address: [_1]',$data);                      my ($path,$clientip) = split(/\s+/,$data,2);
                       $path =~ s/^webdav//;
                       if ($clientip ne '') {
                           $extra = &mt('Client IP address: [_1]',$clientip);
                       }
                       if ($path ne '') {
                           $shown .= ' '.&mt('(WebDAV access to [_1])',$path);
                       }
                   } elsif ($data ne '') {
                       $extra = &mt('Client IP address: [_1]',$data);
                 }                  }
             }              }
             $r->print(              $r->print(

Removed from v.1.406.2.12  
changed lines
  Added in v.1.406.2.13


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>