--- loncom/interface/loncommon.pm 2021/11/30 15:55:37 1.1372 +++ loncom/interface/loncommon.pm 2022/01/18 21:03:15 1.1375 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1372 2021/11/30 15:55:37 raeburn Exp $ +# $Id: loncommon.pm,v 1.1375 2022/01/18 21:03:15 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5225,6 +5225,17 @@ sub blockcheck { } } } + } elsif (($activity eq 'com') || ($activity eq 'port') || ($activity eq 'blogs') || + ($activity eq 'about') || ($activity eq 'wishlist') || ($activity eq 'passwd')) { + my $checkrole; + if ($env{'request.role.domain'} eq '') { + $checkrole = "cm./$env{'user.domain'}/"; + } else { + $checkrole = "cm./$env{'request.role.domain'}/"; + } + if (($checkrole) && (&Apache::lonnet::allowed('evb',undef,undef,$checkrole))) { + $has_evb = 1; + } } unless ($has_evb || $check_ipaccess) { my @machinedoms = &Apache::lonnet::current_machine_domains(); @@ -5270,6 +5281,9 @@ sub blockcheck { } } } + if (($activity eq 'wishlist') || ($activity eq 'annotate')) { + return (); + } } if (defined($udom) && defined($uname)) { # If uname and udom are for a course, check for blocks in the course. @@ -5286,7 +5300,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. @@ -5635,6 +5652,10 @@ END_MYBLOCK $text = &mt('Checking Course Update 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";
@@ -5931,8 +5952,12 @@ sub domainlogo { &Apache::lonnet::repcopy($local_name); } $imgsrc = &lonhttpdurl($imgsrc); - } - return ''.$domain.''; + } + my $alttext = $domain; + if ($designhash{$domain.'.login.alttext_domlogo'} ne '') { + $alttext = $designhash{$domain.'.login.alttext_domlogo'}; + } + return ''; } elsif (defined(&Apache::lonnet::domain($domain,'description'))) { return &Apache::lonnet::domain($domain,'description'); } else {