--- loncom/interface/grouproster.pm 2010/03/22 20:11:22 1.9
+++ loncom/interface/grouproster.pm 2016/02/26 21:44:39 1.10
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: grouproster.pm,v 1.9 2010/03/22 20:11:22 droeschl Exp $
+# $Id: grouproster.pm,v 1.10 2016/02/26 21:44:39 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -33,6 +33,7 @@ use Apache::loncommon;
use Apache::lonhtmlcommon;
use Apache::lonlocal;
use Apache::longroup;
+use Apache::lonnavmaps;
use LONCAPA;
use Apache::Constants qw(:common :http);
use lib '/home/httpd/lib/perl/';
@@ -157,11 +158,21 @@ function changeSort(caller) {
$output .= '
'.&mt('Group membership status - [_1]',$description).
'
';
} else {
- &Apache::lonhtmlcommon::add_breadcrumb
- ({href=>"/adm/$cdom/$cnum/$group/smppg?$refarg",
+ 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=>"$ucgpterm: $description",
- title=>"Go to group's home page"},
- {href=>'/adm/grouproster?group='.$group.'&'.$refarg,
+ title=>"Go to group's home page"},);
+ } else {
+ &Apache::lonhtmlcommon::add_breadcrumb
+ ({text=>"$ucgpterm: $description",});
+ }
+ &Apache::lonhtmlcommon::add_breadcrumb
+ ({href=>'/adm/grouproster?group='.$group.'&'.$refarg,
text=>"Membership Roster",
title=>"Display group membership"},);
$output .= &Apache::lonhtmlcommon::breadcrumbs(&mt($gpterm.' membership status - [_1]',$description));