--- loncom/interface/loncommon.pm 2021/12/24 22:04:54 1.1075.2.160 +++ loncom/interface/loncommon.pm 2023/09/11 13:54:11 1.1075.2.165 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1075.2.160 2021/12/24 22:04:54 raeburn Exp $ +# $Id: loncommon.pm,v 1.1075.2.165 2023/09/11 13:54:11 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4753,6 +4753,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(); @@ -4798,6 +4809,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. @@ -5431,8 +5445,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 { @@ -5825,8 +5843,8 @@ sub bodytag { } elsif ($forcereg) { $bodytag .= &Apache::lonmenu::innerregister($forcereg,undef, $args->{'group'}, - $args->{'hide_buttons', - $hostname}); + $args->{'hide_buttons'}, + $hostname); } else { my $forbodytag; &Apache::lonmenu::prepare_functions($env{'request.noversionuri'}, @@ -5975,6 +5993,9 @@ sub endbodytag { $endbodytag; } } + if ((ref($args) eq 'HASH') && ($args->{'dashjs'})) { + $endbodytag = &Apache::lonhtmlcommon::dash_to_minus_js().$endbodytag; + } return $endbodytag; } @@ -14893,7 +14914,7 @@ sub recurse_categories { for (my $k=0; $k<@{$cats->[$depth]{$category}}; $k++) { my $name = $cats->[$depth]{$category}[$k]; my $item = &escape($category).':'.&escape($parents->[-1]).':'.$shallower; - my $trailstr = join(' -> ',(@{$parents},$category)); + my $trailstr = join(' » ',(@{$parents},$category)); if ($allitems->{$item} eq '') { push(@{$trails},$trailstr); $allitems->{$item} = scalar(@{$trails})-1;