[LON-CAPA-cvs] cvs: loncom /interface lonpickstudent.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 06 Jan 2003 13:53:26 -0000
www Mon Jan 6 08:53:26 2003 EDT
Modified files:
/loncom/interface lonpickstudent.pm
Log:
Using loncoursedata::get_classlist
Index: loncom/interface/lonpickstudent.pm
diff -u loncom/interface/lonpickstudent.pm:1.2 loncom/interface/lonpickstudent.pm:1.3
--- loncom/interface/lonpickstudent.pm:1.2 Mon Dec 30 09:10:58 2002
+++ loncom/interface/lonpickstudent.pm Mon Jan 6 08:53:26 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Pick a student from the classlist
#
-# $Id: lonpickstudent.pm,v 1.2 2002/12/30 14:10:58 www Exp $
+# $Id: lonpickstudent.pm,v 1.3 2003/01/06 13:53:26 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -67,9 +67,7 @@
$filter=~s/\W//g;
unless ($filter) { $filter='.'; }
- my $classlist=&Apache::loncoursedata::DownloadClasslist
- ($ENV{'request.course.id'},
- 'Not downloaded',$r->connection);
+ my $classlist=&Apache::loncoursedata::get_classlist();
# --------------------------------------- There is such a user, get environment
@@ -95,21 +93,22 @@
}
$r->print('<form><table>');
foreach (sort keys %$classlist) {
- if ($_=~/^(\w+)\:(\w+)\:studentInformation$/) {
+ # the following undefs are for 'domain', and 'username' respectively.
+ my (undef,undef,$end,$start,$id,$section,$fullname,$status)=
+ @{$classlist->{$_}};
+ if ($_=~/^(\w+)\:(\w+)$/) {
my ($uname,$udom)=($1,$2);
if (($uname=~/^$filter/) ||
- ($classlist->{$_}->{'lastname'}=~/^$filter/i)) {
+ ($fullname=~/^$filter/i)) {
$r->print('<tr><td>'.
'<input type="button" value="Select" onClick="gochoose('.
"'".$uname."','".$udom."')".'" /></td>'.
'<td><tt>'.$uname.'</tt></td><td><tt>'.$udom.
'</tt></td><td>'.
&Apache::loncommon::aboutmewrapper(
- $classlist->{$_}->{'lastname'}.', '.
- $classlist->{$_}->{'firstname'}.' '.
- $classlist->{$_}->{'middlename'}.' '.
- $classlist->{$_}->{'generation'},
- $uname,$udom).'</td></tr>');
+ $fullname,
+ $uname,$udom).'</td><td>'.$id.'</td><td>'.$section.
+ '</td></tr>');
}
}
}