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