--- loncom/interface/spreadsheet/Spreadsheet.pm 2006/04/06 16:43:49 1.66 +++ loncom/interface/spreadsheet/Spreadsheet.pm 2006/05/01 06:17:16 1.68 @@ -1,5 +1,5 @@ # -# $Id: Spreadsheet.pm,v 1.66 2006/04/06 16:43:49 albertel Exp $ +# $Id: Spreadsheet.pm,v 1.68 2006/05/01 06:17:16 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -85,7 +85,7 @@ sub new { my $class = ref($this) || $this; my ($stype) = ($class =~ /Apache::(.*)$/); # - my ($name,$domain,$filename,$usymb,$section)=@_; + my ($name,$domain,$filename,$usymb,$section,$groups)=@_; if (defined($usymb) && ref($usymb)) { $usymb = $usymb->symb; } @@ -99,11 +99,18 @@ sub new { $section = &Apache::lonnet::getsection($domain,$name, $env{'request.course.id'}); } + if (! defined($groups)) { + + my @usersgroups = &Apache::lonnet::get_users_groups($domain,$name, + $env{'request.course.id'}); + $groups = \@usersgroups; + } # my $self = { name => $name, domain => $domain, section => $section, + groups => $groups, type => $stype, symb => $usymb, errorlog => '',