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

raeburn raeburn at source.lon-capa.org
Tue Aug 6 13:53:56 EDT 2019


raeburn		Tue Aug  6 17:53:56 2019 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  - For 2.11
    Backport 1.183
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.181.2.1 loncom/interface/lonmsgdisplay.pm:1.181.2.2
--- loncom/interface/lonmsgdisplay.pm:1.181.2.1	Sun Apr  2 13:31:48 2017
+++ loncom/interface/lonmsgdisplay.pm	Tue Aug  6 17:53:56 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.181.2.1 2017/04/02 13:31:48 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.181.2.2 2019/08/06 17:53:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -102,6 +102,8 @@
 use Apache::Constants qw(:common);
 use Apache::loncommon();
 use Apache::lonhtmlcommon();
+use Apache::longroup;
+use Apache::lonnavmaps;
 use Apache::lontexconvert();
 use HTML::Entities();
 use Apache::lonlocal;
@@ -773,14 +775,24 @@
               text=>"Groups",
               title=>$brtitle});
     }
+    my $view_permission =
+          &Apache::lonnet::allowed('vcg',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''));
+    my $navmap=Apache::lonnavmaps::navmap->new();
+    my $grouppagelink = &Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap,$view_permission,$refarg);
+    if ($grouppagelink) {
+        &Apache::lonhtmlcommon::add_breadcrumb
+            ({href=>$grouppagelink,
+              text=>"Group: $description",
+              title=>"Go to group's home page"},);
+    } else {
+        &Apache::lonhtmlcommon::add_breadcrumb
+            ({text=>"Group: $description",});
+    }
     &Apache::lonhtmlcommon::add_breadcrumb
-        ({href=>"/adm/$cdom/$cnum/$group/smppg?$refarg",
-          text=>"Group: $description",
-          title=>"Go to group's home page"},
-         {href=>"/adm/email?compose=group&group=".
-                "$env{'form.group'}&$refarg",
-          text=>"Send a Message in a Group",
-          title=>"Compose Group Message"},);
+         ({href=>"/adm/email?compose=group&group=".
+                 "$env{'form.group'}&$refarg",
+           text=>"Send a Message in a Group",
+           title=>"Compose Group Message"},);
     if ($action eq 'sending') {
             &Apache::lonhtmlcommon::add_breadcrumb
                          ({text=>"Messages being sent.",




More information about the LON-CAPA-cvs mailing list