--- loncom/interface/grouproster.pm	2006/07/02 18:01:47	1.1
+++ loncom/interface/grouproster.pm	2006/07/08 00:59:22	1.2
@@ -31,6 +31,7 @@ use Apache::loncommon;
 use Apache::lonhtmlcommon;
 use Apache::lonlocal;
 use Apache::longroup;
+use LONCAPA;
 use Apache::Constants qw(:common :http);
 use lib '/home/httpd/lib/perl/';
 
@@ -77,11 +78,11 @@ sub handler {
         $r->print(&mt('Invalid [_1]',$crstype));
     }
 
-    my @coursegroups = split(/:/,$env{'request.course.groups'});
-    if ((@coursegroups == 0) || ((@coursegroups > 0) && 
-                                 (!(grep/^\Q$group\E$/,@coursegroups)))) {
+    my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum);
+    if (!defined($curr_groups{$group})) {
         $r->print(&mt('[_1] is not the name of a valid [_2] in this [_3].',
                       $group,$gpterm,lc($crstype)));
+        return OK;
     } 
 
     &Apache::lonhtmlcommon::clear_breadcrumbs();
@@ -97,8 +98,7 @@ sub handler {
         $r->print(&mt('You do not have privileges to view the membership roster in this [_1]',$gpterm));
         return OK;
     }
-    my %coursegroups = &Apache::longroup::coursegroups($cdom,$cnum,$group);
-    my %content = &Apache::longroup::get_group_settings($coursegroups{$group});
+    my %content = &Apache::longroup::get_group_settings($curr_groups{$group});
     my $description = &unescape($content{'description'});
     $r->print(&roster_header($cdom,$cnum,$group,$description,$gpterm,$ucgpterm));
 
@@ -128,7 +128,7 @@ function changeSort(caller) {
                                        '<script type="text/javascript">'.
                                        $jscript.'</script>');
     &Apache::lonhtmlcommon::add_breadcrumb
-        ({href=>"/adm/$cdom/$cnum/$group/grppg",
+        ({href=>"/adm/$cdom/$cnum/$group/smppg",
           text=>"$ucgpterm: $description",
           title=>"Go to group's home page"},
          {href=>"/adm/grouproster?group=$group",
@@ -203,8 +203,8 @@ sub roster_table {
     if (ref($numitems) eq 'HASH') {
         foreach my $key (keys(%{$numitems})) {
             if ($status eq $key && !$$numitems{$key}) {
-                $r->print(&mt('There are no [_1] members to display in this [_2]',
-                              $key,$gpterm));
+                $r->print(&mt('There are no [_1]s to display in this [_2].',
+                              lc($lt{$key}),$gpterm));
                 return;
             }
         }