--- loncom/lonnet/perl/lonnet.pm 2023/10/02 21:01:22 1.1515 +++ loncom/lonnet/perl/lonnet.pm 2023/10/06 01:22:06 1.1516 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1515 2023/10/02 21:01:22 raeburn Exp $ +# $Id: lonnet.pm,v 1.1516 2023/10/06 01:22:06 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5471,15 +5471,15 @@ sub courserolelog { $storehash{'group'} = $sec; } else { $storehash{'section'} = $sec; - my ($curruserdomstr,$newuserdomstr); + my ($curruserdomstr,$newuserdomstr); if (exists($env{'course.'.$cdom.'_'.$cnum.'.internal.userdomains'})) { $curruserdomstr = $env{'course.'.$env{'request.course.id'}.'.internal.userdomains'}; - } else { + } else { my %courseinfo = &coursedescription($cdom.'/'.$cnum); $curruserdomstr = $courseinfo{'internal.userdomains'}; } - if ($currusedomstr ne '') { - my @udoms = split(/,/,$courseinfo{'internal.userdomains'}); + if ($curruserdomstr ne '') { + my @udoms = split(/,/,$curruserdomstr); unless (grep(/^\Q$domain\E/,@udoms)) { push(@udoms,$domain); $newuserdomstr = join(',',sort(@udoms));