--- loncom/interface/Attic/lonchart.pm 2001/01/31 23:21:06 1.1 +++ loncom/interface/Attic/lonchart.pm 2001/02/05 18:58:04 1.3 @@ -32,16 +32,17 @@ my @students; # ------------------------------------------------------------- Find out status sub astatus { - my $rid=shift; + my ($rid,$student)=@_; + my ($uname,$udom)=split(/\:/,$student); my $code=' '; $rid=~/(\d+)\.(\d+)/; my $symb=&Apache::lonnet::declutter($hash{'map_id_'.$1}).'___'.$2.'___'. &Apache::lonnet::declutter($hash{'src_'.$rid}); my $answer=&Apache::lonnet::reply( - "restore:$ENV{'user.domain'}:$ENV{'user.name'}:". + "restore:$udom:$uname:". $ENV{'request.course.id'}.':'. &Apache::lonnet::escape($symb), - "$ENV{'user.home'}"); + &Apache::lonnet::homeserver($uname,$udom)); my %returnhash=(); map { my ($name,$value)=split(/\=/,$_); @@ -208,15 +209,25 @@ sub handler { 'Data not available: '.$name; } else { my %reply=&Apache::lonnet::idrget($sdom,$sname); - my $reply=&Apache::lonnet::reply('get:'.$sdom.':'.$sname. - ':environment:firstname&middlename&lastname&generation', - &Apache::lonnet::homeserver($sname,$sdom)); + my $reply=&Apache::lonnet::reply('get:'.$sdom.':'.$sname. + ':environment:lastname&generation&firstname&middlename', + &Apache::lonnet::homeserver($sname,$sdom)); $rowlabels[$thisindex]= - $ssec.' '.$reply{$sname}.' '; + sprintf('%3s',$ssec).' '.$reply{$sname}.' '; + my $i=0; map { - $rowlabels[$thisindex].=&Apache::lonnet::unescape($_).' '; + $i++; + if ( $_ ne '') { + $rowlabels[$thisindex].=&Apache::lonnet::unescape($_).' +'; + } + if ($i == 2) { + chop($rowlabels[$thisindex]); + $rowlabels[$thisindex].=', '; + } } split(/\&/,$reply); - } + + } } } sort split(/\&/,$classlst); @@ -240,7 +251,7 @@ sub handler { $r->print( substr($students[$index]. ' ',0,14).' ! '. - substr($rowlabels[$index]. + substr($rowlabels[$index]. ' ',0,45).' ! '); map { if ($_) {