--- loncom/interface/lonpickstudent.pm 2005/04/07 06:56:23 1.9
+++ loncom/interface/lonpickstudent.pm 2006/03/16 21:53:17 1.14
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Pick a student from the classlist
#
-# $Id: lonpickstudent.pm,v 1.9 2005/04/07 06:56:23 albertel Exp $
+# $Id: lonpickstudent.pm,v 1.14 2006/03/16 21:53:17 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -42,26 +42,26 @@ sub handler {
return OK if $r->header_only;
# ------------------------------------------------------------ Print the screen
- my $html=&Apache::lonxml::xmlbegin();
- $r->print(<
username | domain | Name | ID | section | active group(s) | '); # ------------------------------------------------------------------ Students foreach (sort keys %$classlist) { # the following undefs are for 'domain', and 'username' respectively. my (undef,undef,$end,$start,$id,$section,$fullname,$status)= @{$classlist->{$_}}; + if ($allowed eq 'section' && $section ne $env{'request.course.sec'}) { + next; + } if ($_=~/^(\w+)\:(\w+)$/) { my ($uname,$udom)=($1,$2); if (($uname=~/^$filter/) || ($fullname=~/^$filter/i)) { + my $grouplist = ''; + foreach my $group (sort(keys(%allgroups))) { + if (exists($grouplist{$group.':'.$uname.':'.$udom})) { + my ($end,$start) = split(/:/,$grouplist{$group.':'.$uname.':'.$udom}); + if (($end!=0) && ($end<$now)) { next; } + if (($start!=0) && ($start>$now)) {next; } + $grouplist .= " $group,"; + } + } + $grouplist =~ s/,$//; $r->print('|
---|---|---|---|---|---|---|
'. ' | '. @@ -132,7 +149,7 @@ ENDSCRIPT &Apache::loncommon::aboutmewrapper( $fullname, $uname,$udom).''.$id.' | '.$section. - ' | '.$grouplist.' | '); } } } @@ -168,7 +185,7 @@ ENDSCRIPT } $r->print('