version 1.13, 2006/03/16 21:34:04
|
version 1.19, 2006/06/02 13:58:31
|
Line 34 use Apache::loncommon;
|
Line 34 use Apache::loncommon;
|
use Apache::loncoursedata; |
use Apache::loncoursedata; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::longroup; |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 76 sub handler {
|
Line 77 sub handler {
|
my $classlist=&Apache::loncoursedata::get_classlist(); |
my $classlist=&Apache::loncoursedata::get_classlist(); |
my %grouplist=&Apache::lonnet::get_group_membership($cdom,$cnum); |
my %grouplist=&Apache::lonnet::get_group_membership($cdom,$cnum); |
my $now = time; |
my $now = time; |
my %allgroups; |
my %allgroups = &Apache::longroup::coursegroups($cdom,$cnum); |
my @coursegroups = (); |
|
if (&Apache::loncommon::coursegroups(\%allgroups,$cdom,$cnum)) { |
|
@coursegroups = keys(%allgroups); |
|
} |
|
|
|
# --------------------------------------- There is such a user, get environment |
# --------------------------------------- There is such a user, get environment |
|
|
Line 109 ENDSCRIPT
|
Line 106 ENDSCRIPT
|
foreach my $role (sort keys %coursepersonnel) { |
foreach my $role (sort keys %coursepersonnel) { |
foreach (split(/\,/,$coursepersonnel{$role})) { |
foreach (split(/\,/,$coursepersonnel{$role})) { |
my ($puname,$pudom)=split(/\:/,$_); |
my ($puname,$pudom)=split(/\:/,$_); |
|
$role = &Apache::lonnet::plaintext($role, |
|
&Apache::loncommon::course_type()); |
$r->print('<tr><td>'. |
$r->print('<tr><td>'. |
'<input type="button" value="Select" onClick="gochoose('. |
'<input type="button" value="Select" onClick="gochoose('. |
"'".$puname."','".$pudom."')".'" /></td><td>'.$role.'</td><td>'. |
"'".$puname."','".$pudom."')".'" /></td><td>'.$role.'</td><td>'. |
Line 121 ENDSCRIPT
|
Line 120 ENDSCRIPT
|
if ($filter ne '.') { |
if ($filter ne '.') { |
$r->print('<br/ >'.&mt('Name starting with').' "'.$filter.'"<br />'); |
$r->print('<br/ >'.&mt('Name starting with').' "'.$filter.'"<br />'); |
} |
} |
$r->print('</p><p><table><tr><th> </th><th>username</th><th>domain</th><th>Name</th><th>ID</th><th>section</th><th>active group(s)</th>'); |
$r->print('</p><p><table><tr><th> </th><th>username</th><th>domain</th><th>Name</th><th>ID</th><th>section</th><th>active group(s)</th></tr>'); |
# ------------------------------------------------------------------ Students |
# ------------------------------------------------------------------ Students |
foreach (sort keys %$classlist) { |
foreach (sort keys %$classlist) { |
# the following undefs are for 'domain', and 'username' respectively. |
# the following undefs are for 'domain', and 'username' respectively. |
Line 135 ENDSCRIPT
|
Line 134 ENDSCRIPT
|
if (($uname=~/^$filter/) || |
if (($uname=~/^$filter/) || |
($fullname=~/^$filter/i)) { |
($fullname=~/^$filter/i)) { |
my $grouplist = ''; |
my $grouplist = ''; |
foreach my $group (@coursegroups) { |
foreach my $group (sort(keys(%allgroups))) { |
if (exists($grouplist{$group.':'.$uname.':'.$udom})) { |
if (exists($grouplist{$group.':'.$uname.':'.$udom})) { |
my ($end,$start) = split(/:/,$grouplist{$group.':'.$uname.':'.$udom}); |
my ($end,$start) = split(/:/,$grouplist{$group.':'.$uname.':'.$udom}); |
if (($end!=0) && ($end<$now)) { next; } |
if (($end!=0) && ($end<$now)) { next; } |