--- loncom/interface/loncommon.pm 2021/12/13 19:55:44 1.1075.2.158 +++ loncom/interface/loncommon.pm 2021/12/24 22:04:54 1.1075.2.160 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1075.2.158 2021/12/13 19:55:44 raeburn Exp $ +# $Id: loncommon.pm,v 1.1075.2.160 2021/12/24 22:04:54 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4814,7 +4814,10 @@ sub blockcheck { my $startblock = 0; my $endblock = 0; my $triggerblock = ''; - my %live_courses = &findallcourses(undef,$uname,$udom); + my %live_courses; + unless (($activity eq 'wishlist') || ($activity eq 'annotate')) { + %live_courses = &findallcourses(undef,$uname,$udom); + } # If uname is for a user, and activity is course-specific, i.e., # boards, chat or groups, check for blocking in current course only. @@ -5157,6 +5160,10 @@ END_MYBLOCK $text = &mt('Search Blocked'); } elsif ($activity eq 'about') { $text = &mt('Access to User Information Pages Blocked'); + } elsif ($activity eq 'wishlist') { + $text = &mt('Access to Stored Links Blocked'); + } elsif ($activity eq 'annotate') { + $text = &mt('Access to Annotations Blocked'); } $output .= <<"END_BLOCK";
@@ -5689,7 +5696,7 @@ sub bodytag { if ($realm) { $realm = '/'.$realm; } - if ($rol eq 'ca') { + if ($role eq 'ca') { my ($rdom,$rname) = ($realm =~ m{^/($match_domain)/($match_username)$}); $realm = &plainname($rname,$rdom); } @@ -5748,7 +5755,7 @@ sub bodytag { # # Extra info if you are the DC my $dc_info = ''; - if (($env{'user.adv'} && ($env{'request.course.id'}) && + if (($env{'user.adv'}) && ($env{'request.course.id'}) && (exists($env{'user.role.dc./'.$env{'course.'.$cid.'.domain'}.'/'}))) { $dc_info = $cid.' '.$env{'course.'.$cid.'.internal.coursecode'}; $dc_info =~ s/\s+$//;