--- loncom/interface/lonmsgdisplay.pm 2015/06/09 21:22:56 1.181 +++ loncom/interface/lonmsgdisplay.pm 2017/04/02 13:31:48 1.181.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.181 2015/06/09 21:22:56 damieng Exp $ +# $Id: lonmsgdisplay.pm,v 1.181.2.1 2017/04/02 13:31:48 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2174,7 +2174,8 @@ sub displaymessage { my @actionlist; if ($env{'user.adv'}) { - if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { + if (($env{'request.course.id'}) && ($from_student) && + (&Apache::lonnet::allowed('vgr',$env{'request.course.id'}))) { push(@actionlist,&Apache::loncommon::track_student_link( 'View recent activity' ,$content{'sendername'}