[LON-CAPA-cvs] cvs: loncom /interface lonmsgdisplay.pm

raeburn raeburn at source.lon-capa.org
Wed Mar 15 16:58:12 EDT 2017


raeburn		Wed Mar 15 20:58:12 2017 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  - Only show "View recent activity" as an available action if current user is
    in course context, and the sender is a student who was in the same course
    context when sending the message.
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.183 loncom/interface/lonmsgdisplay.pm:1.184
--- loncom/interface/lonmsgdisplay.pm:1.183	Fri Feb 26 21:44:39 2016
+++ loncom/interface/lonmsgdisplay.pm	Wed Mar 15 20:58:12 2017
@@ -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 @@
     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'}




More information about the LON-CAPA-cvs mailing list