Diff for /loncom/interface/grouproster.pm between versions 1.1 and 1.2

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

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>