--- loncom/interface/lonmsgdisplay.pm 2016/02/26 21:44:39 1.183 +++ loncom/interface/lonmsgdisplay.pm 2017/03/15 20:58:12 1.184 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.183 2016/02/26 21:44:39 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.184 2017/03/15 20:58:12 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2189,7 +2189,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'}