--- loncom/interface/lonuserutils.pm 2022/12/01 01:28:26 1.213 +++ loncom/interface/lonuserutils.pm 2023/08/01 15:56:32 1.216 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.213 2022/12/01 01:28:26 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.216 2023/08/01 15:56:32 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -616,7 +616,7 @@ sub print_roles_queued { $output .= '

'; if (keys(%touser)) { foreach my $key (keys(%touser)) { - my ($uname,$udom) = split(/:/,$touser{$key}); + my ($uname,$udom) = split(/:/,$key); if (&Apache::lonnet::put('nohist_queuedrolereqs',$touser{$key},$udom,$uname) eq 'ok') { my $owndomdesc = &Apache::lonnet::domain($udom); &Apache::loncoursequeueadmin::send_selfserve_notification($uname.':'.$udom, @@ -1065,7 +1065,7 @@ END "; } elsif ($mode eq 'modifycourse') { $auth_checks .= " - if (vf.elements[current.argfield].value == null || vf.elements[current.argfield].value == '') { + if ((current.argfield !== null) && (current.argfield !== undefined) && (current.argfield !== '') && (vf.elements[current.argfield].value == null || vf.elements[current.argfield].value == '')) { "; } if ( ($mode eq 'createcourse') || ($mode eq 'modifycourse') ) { @@ -6780,6 +6780,9 @@ sub get_permission { $permission{'selfenrolladmin'} = 1; } } + unless ($permission{'selfenrolladmin'}) { + $permission{'selfenrollview'} = 1; + } } if ($env{'request.course.id'}) { my $user; @@ -7243,7 +7246,7 @@ sub selfenrollment_administration { } } if ($settings{'internal.selfenrollmgrdc'} ne '') { - my @in_domain = split(/,/,$settings{'internal.selfenrollmgrdc'}); + @in_domain = split(/,/,$settings{'internal.selfenrollmgrdc'}); my @diffs = &Apache::loncommon::compare_arrays(\@in_domain,$possconfigs); unless (@diffs) { return (\@in_course,\@in_domain);