--- loncom/lonnet/perl/lonnet.pm 2022/10/29 18:13:29 1.1500 +++ loncom/lonnet/perl/lonnet.pm 2022/11/23 02:55:37 1.1502 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1500 2022/10/29 18:13:29 raeburn Exp $ +# $Id: lonnet.pm,v 1.1502 2022/11/23 02:55:37 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2924,6 +2924,7 @@ sub get_dom_instcats { if (&auto_instcode_format($caller,$dom,\%coursecodes,\%codes, \@codetitles,\%cat_titles,\%cat_order) eq 'ok') { $instcats = { + totcodes => $totcodes, codes => \%codes, codetitles => \@codetitles, cat_titles => \%cat_titles, @@ -10333,7 +10334,7 @@ sub assignrole { if ($role =~ /^cr\//) { my $cwosec=$url; $cwosec=~s/^\/($match_domain)\/($match_courseid)\/.*/$1\/$2/; - unless (&allowed('ccr',$cwosec)) { + if ((!&allowed('ccr',$cwosec)) && (!&allowed('ccr',$udom))) { my $refused = 1; if ($context eq 'requestcourses') { if (($env{'user.name'} ne '') && ($env{'user.domain'} ne '')) {