version 1.277, 2005/10/04 18:29:54
|
version 1.279, 2005/10/13 22:37:40
|
Line 3082 sub get_course_users {
|
Line 3082 sub get_course_users {
|
my $startidx = &Apache::loncoursedata::CL_START(); |
my $startidx = &Apache::loncoursedata::CL_START(); |
my $endidx = &Apache::loncoursedata::CL_END(); |
my $endidx = &Apache::loncoursedata::CL_END(); |
my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist($cdom,$cnum); |
my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist($cdom,$cnum); |
|
my $now = time; |
foreach my $student (keys(%{$classlist})) { |
foreach my $student (keys(%{$classlist})) { |
if (defined($$types{'active'})) { |
if (defined($$types{'active'})) { |
if ($$classlist{$student}[$statusidx] eq 'Active') { |
if ($$classlist{$student}[$statusidx] eq 'Active') { |
Line 3089 sub get_course_users {
|
Line 3090 sub get_course_users {
|
} |
} |
} |
} |
if (defined($$types{'previous'})) { |
if (defined($$types{'previous'})) { |
if ($$classlist{$student}[$endidx] <= time) { |
if ($$classlist{$student}[$endidx] <= $now) { |
push(@{$$users{st}{$student}},'previous'); |
push(@{$$users{st}{$student}},'previous'); |
} |
} |
} |
} |
if (defined($$types{'future'})) { |
if (defined($$types{'future'})) { |
if (($$classlist{$student}[$startidx] > 0) && ($$classlist{$student}[$endidx] > time) || ($$classlist{$student}[$endidx] == 0) || ($$classlist{$student}[$endidx] eq '')) { |
if (($$classlist{$student}[$startidx] > $now) && ($$classlist{$student}[$endidx] > $now) || ($$classlist{$student}[$endidx] == 0) || ($$classlist{$student}[$endidx] eq '')) { |
push(@{$$users{st}{$student}},'future'); |
push(@{$$users{st}{$student}},'future'); |
} |
} |
} |
} |
Line 3117 sub get_course_users {
|
Line 3118 sub get_course_users {
|
} |
} |
} |
} |
} |
} |
|
if (grep/^ow$/,@{$roles}) { |
|
if ((defined($cdom)) && (defined($cnum))) { |
|
my %csettings = &Apache::lonnet::get('environment',['internal.courseowner'],$cdom,$cnum); |
|
if ( defined($csettings{'internal.courseowner'}) ) { |
|
my $owner = $csettings{'internal.courseowner'}; |
|
$$users{'ow'}{$owner.':'.$cdom} = 'any'; |
|
} |
|
} |
|
} |
} |
} |
return; |
return; |
} |
} |