version 1.65, 2006/03/05 21:38:27
|
version 1.67, 2006/04/06 20:24:13
|
Line 85 sub new {
|
Line 85 sub new {
|
my $class = ref($this) || $this; |
my $class = ref($this) || $this; |
my ($stype) = ($class =~ /Apache::(.*)$/); |
my ($stype) = ($class =~ /Apache::(.*)$/); |
# |
# |
my ($name,$domain,$filename,$usymb)=@_; |
my ($name,$domain,$filename,$usymb,$section,$group)=@_; |
if (defined($usymb) && ref($usymb)) { |
if (defined($usymb) && ref($usymb)) { |
$usymb = $usymb->symb; |
$usymb = $usymb->symb; |
} |
} |
Line 95 sub new {
|
Line 95 sub new {
|
if (! defined($domain) || $domain eq '') { |
if (! defined($domain) || $domain eq '') { |
$domain = $env{'user.domain'}; |
$domain = $env{'user.domain'}; |
} |
} |
|
if (! defined($section) || $section eq '') { |
|
$section = &Apache::lonnet::getsection($domain,$name, |
|
$env{'request.course.id'}); |
|
} |
|
if (! defined($group) || $group eq '') { |
|
my $grouplist = &Apache::lonnet::get_users_groups($domain,$name, |
|
$env{'request.course.id'}); |
|
if ($grouplist) { |
|
my @groups = &Apache::lonnet::sort_course_groups($grouplist, |
|
$env{'request.course.id'}); |
|
$group = $groups[0]; |
|
} |
|
} |
# |
# |
my $self = { |
my $self = { |
name => $name, |
name => $name, |
domain => $domain, |
domain => $domain, |
|
section => $section, |
|
group => $group, |
type => $stype, |
type => $stype, |
symb => $usymb, |
symb => $usymb, |
errorlog => '', |
errorlog => '', |