Diff for /loncom/interface/loncreateuser.pm between versions 1.460 and 1.461

version 1.460, 2022/10/18 23:28:00 version 1.461, 2022/11/10 14:08:37
Line 1618  ENDNOTOOLSPRIV Line 1618  ENDNOTOOLSPRIV
                 if ($newuser) {                  if ($newuser) {
                     $r->print(' onclick="auth_check()" \>'."\n");                      $r->print(' onclick="auth_check()" \>'."\n");
                 } else {                  } else {
                     $r->print('onclick="this.form.submit()" \>'."\n");                      $r->print(' onclick="this.form.submit()" \>'."\n");
                 }                  }
             } else {              } else {
                 $r->print('</fieldset></div>'.                  $r->print('</fieldset></div>'.
Line 3127  sub update_user_data { Line 3127  sub update_user_data {
                 }                  }
             } elsif ($context eq 'author') {              } elsif ($context eq 'author') {
                 if ($rolenum eq $auname && $roledom eq $audom) {                  if ($rolenum eq $auname && $roledom eq $audom) {
                     if (!grep(/^\Q$role\E$/,@userroles)) {                       if (!grep(/^\Q$role\E$/,@userroles)) {
                         push(@userroles,$role);                          push(@userroles,$role);
                     }                      }
                 }                  }
Line 4103  sub update_roles { Line 4103  sub update_roles {
     my $result=&Apache::lonnet::assignrole($env{'form.ccdomain'},      my $result=&Apache::lonnet::assignrole($env{'form.ccdomain'},
                                $env{'form.ccuname'},$url,$role,0,$now,'','',                                 $env{'form.ccuname'},$url,$role,0,$now,'','',
                                $context);                                 $context);
                         $output = &Apache::lonhtmlcommon::confirm_success(&mt('Re-enabling [_1] in [_2]',                      $output = &Apache::lonhtmlcommon::confirm_success(&mt('Re-enabling [_1] in [_2]',
                                         &Apache::lonnet::plaintext($role),                                      &Apache::lonnet::plaintext($role),
                                         &Apache::loncommon::show_role_extent($url,$context,$role)),$result ne "ok").'<br />';                                      &Apache::loncommon::show_role_extent($url,$context,$role)),$result ne "ok").'<br />';
                     if ($result ne "ok") {                      if ($result ne "ok") {
                         $output .= &mt('Error: [_1]',$result).'<br />';                          $output .= &mt('Error: [_1]',$result).'<br />';
                     }                      }
Line 4150  sub update_roles { Line 4150  sub update_roles {
                                                                                                                                                                             
                 # split multiple sections                  # split multiple sections
                 my %sections = ();                  my %sections = ();
                 my $num_sections = &build_roles($env{'form.sec_'.$full},\%sections,$5);                  my $num_sections = &build_roles($env{'form.sec_'.$full},\%sections,$five);
                 if ($num_sections == 0) {                  if ($num_sections == 0) {
                     $r->print(&Apache::loncommon::commit_customrole($udom,$uname,$url,$three,$four,$five,$start,$end,$context));                      $r->print(&Apache::loncommon::commit_customrole($udom,$uname,$url,$three,$four,$five,$start,$end,$context));
                 } else {                  } else {
Line 4173  sub update_roles { Line 4173  sub update_roles {
  # Activate roles for sections with 3 id numbers   # Activate roles for sections with 3 id numbers
  # set start, end times, and the url for the class   # set start, end times, and the url for the class
  my ($one,$two,$three)=($1,$2,$3);   my ($one,$two,$three)=($1,$2,$3);
  my $start = ( $env{'form.start_'.$one.'_'.$two.'_'.$three} ?    my $start = ( $env{'form.start_'.$one.'_'.$two.'_'.$three} ?
       $env{'form.start_'.$one.'_'.$two.'_'.$three} :         $env{'form.start_'.$one.'_'.$two.'_'.$three} :
       $now );        $now );
  my $end   = ( $env{'form.end_'.$one.'_'.$two.'_'.$three} ?    my $end   = ( $env{'form.end_'.$one.'_'.$two.'_'.$three} ?
       $env{'form.end_'.$one.'_'.$two.'_'.$three} :        $env{'form.end_'.$one.'_'.$two.'_'.$three} :
       0 );        0 );
  my $url='/'.$one.'/'.$two;   my $url='/'.$one.'/'.$two;
Line 4186  sub update_roles { Line 4186  sub update_roles {
                 my $num_sections = &build_roles($env{'form.sec_'.$one.'_'.$two.'_'.$three},\%sections,$three);                  my $num_sections = &build_roles($env{'form.sec_'.$one.'_'.$two.'_'.$three},\%sections,$three);
                 my $credits;                  my $credits;
                 if ($three eq 'st') {                  if ($three eq 'st') {
                     if ($showcredits) {                       if ($showcredits) {
                         my $defaultcredits =                           my $defaultcredits = 
                             &Apache::lonuserutils::get_defaultcredits($one,$two);                              &Apache::lonuserutils::get_defaultcredits($one,$two);
                         $credits = $env{'form.credits_'.$one.'_'.$two.'_'.$three};                          $credits = $env{'form.credits_'.$one.'_'.$two.'_'.$three};
Line 4226  sub update_roles { Line 4226  sub update_roles {
     } elsif ($key=~/^form\.act\_([^\_]+)\_([^\_]+)$/) {      } elsif ($key=~/^form\.act\_([^\_]+)\_([^\_]+)$/) {
  # Activate roles for sections with two id numbers   # Activate roles for sections with two id numbers
  # set start, end times, and the url for the class   # set start, end times, and the url for the class
  my $start = ( $env{'form.start_'.$1.'_'.$2} ?    my $start = ( $env{'form.start_'.$1.'_'.$2} ?
       $env{'form.start_'.$1.'_'.$2} :         $env{'form.start_'.$1.'_'.$2} :
       $now );        $now );
  my $end   = ( $env{'form.end_'.$1.'_'.$2} ?    my $end   = ( $env{'form.end_'.$1.'_'.$2} ?
       $env{'form.end_'.$1.'_'.$2} :        $env{'form.end_'.$1.'_'.$2} :
       0 );        0 );
                 my $one = $1;                  my $one = $1;

Removed from v.1.460  
changed lines
  Added in v.1.461


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