--- loncom/lonnet/perl/lonnet.pm 2005/03/28 17:54:06 1.616 +++ loncom/lonnet/perl/lonnet.pm 2005/03/28 21:49:31 1.617 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.616 2005/03/28 17:54:06 albertel Exp $ +# $Id: lonnet.pm,v 1.617 2005/03/28 21:49:31 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -931,6 +931,19 @@ sub userenvironment { return %returnhash; } +# ---------------------------------------------------------- Get a studentphoto +sub studentphoto { + my ($udom,$unam,$ext) = @_; + my $home=&Apache::lonnet::homeserver($unam,$udom); + my $ret=&Apache::lonnet::reply("studentphoto:$udom:$unam:$ext",$home); + my $url="/uploaded/$udom/$unam/internal/studentphoto.".$ext; + if ($ret ne 'ok') { + return '/adm/lonKaputt/lonlogo_broken.gif'; + } + my $tokenurl=&Apache::lonnet::tokenwrapper($url); + return $tokenurl; +} + # -------------------------------------------------------------------- New chat sub chatsend {