--- loncom/homework/grades.pm 2002/05/15 23:47:49 1.24
+++ loncom/homework/grades.pm 2002/05/16 00:01:09 1.25
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.24 2002/05/15 23:47:49 albertel Exp $
+# $Id: grades.pm,v 1.25 2002/05/16 00:01:09 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -118,15 +118,18 @@ ENDTABLEST
foreach my $student ( sort(@{ $classlist{'allids'} }) ) {
my ($sname,$sdom) = split(/:/,$student);
- my $reply=&Apache::lonnet::reply('get:'.$sdom.':'.$sname.
- ':environment:lastname&generation&firstname&middlename',
- &Apache::lonnet::homeserver($sname,$sdom));
- #print "reply=$reply
";
- my (@nameparts) = split /&/,$reply;
-# my $sfullname = $Apache::lonnet::unescape($nameparts[0]);
-
+ my %name=&Apache::lonnet::get('environment', ['lastname','generation',
+ 'firstname','middlename'],
+ $sdom,$sname);
+ my $fullname;
+ my ($tmp) = keys(%name);
+ if ($tmp !~ /^(con_lost|error|no_such_host)/i) {
+ $fullname=$name{'lastname'}.$name{'generation'};
+ if ($fullname =~ /[^\s]+/) { $fullname.=','; }
+ $fullname.=$name{'firstname'}.' '.$name{'middlename'};
+ }
if ( $Apache::grades::viewgrades eq 'F' ) {
- $request->print("\n".'