--- loncom/interface/lonmenu.pm 2020/02/18 23:10:53 1.502 +++ loncom/interface/lonmenu.pm 2021/01/02 21:07:36 1.504 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.502 2020/02/18 23:10:53 raeburn Exp $ +# $Id: lonmenu.pm,v 1.504 2021/01/02 21:07:36 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1283,11 +1283,12 @@ sub prepare_functions { # Determine whether or not to display 'Edit' or 'View Source' icon/button # if ($resurl =~ m{^/?adm/($match_domain)/($match_username)/aboutme$}) { + my $blocked = &Apache::loncommon::blocking_status('about',$2,$1); my $file=&Apache::lonnet::declutter($env{'request.filename'}); ($cfile,$home,$switchserver,$forceedit,$forceview) = &Apache::lonnet::can_edit_resource($file,$cnum,$cdom, &Apache::lonnet::clutter($resurl),$env{'request.symb'},$group); - if (($cfile) && ($home ne '') && ($home ne 'no_host')) { + if (($cfile) && ($home ne '') && ($home ne 'no_host') && (!$blocked)) { $editbutton = &get_editbutton($cfile,$home,$switchserver, $forceedit,$forceview,$forcereg); } @@ -1400,10 +1401,13 @@ sub prepare_functions { if ($resurl =~ m{^/?adm/($match_domain)/($match_username)/aboutme$}) { my ($sdom,$sname) = ($1,$2); unless (&Apache::lonnet::is_course($sdom,$sname)) { - &switch('','',6,4,'mail-message-new-22x22.png','Message to user', - '', - "go('/adm/email?compose=individual&recname=$sname&recdom=$sdom')", - 'Send message to specific user'); + my $blocked = &Apache::loncommon::blocking_status('about',$sname,$sdom); + unless ($blocked) { + &switch('','',6,4,'mail-message-new-22x22.png','Message to user', + '', + "go('/adm/email?compose=individual&recname=$sname&recdom=$sdom')", + 'Send message to specific user'); + } } my $hideprivileged = 1; if (&Apache::lonnet::in_course($sdom,$sname,$cdom,$cnum,undef, @@ -1909,6 +1913,7 @@ sub done_button_js { key => 'Key:', nokey => 'A proctor key is required', ); + my $shownsymb = &HTML::Entities::encode(&Apache::lonenc::check_encrypt($env{'request.symb'})); my $navmap = Apache::lonnavmaps::navmap->new(); my ($missing,$tried) = (0,0); if (ref($navmap)) { @@ -1971,6 +1976,7 @@ sub done_button_js {
+
@@ -2052,6 +2058,7 @@ END
+