--- loncom/lonnet/perl/lonnet.pm 2002/08/07 20:40:57 1.262 +++ loncom/lonnet/perl/lonnet.pm 2002/08/08 13:42:01 1.263 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.262 2002/08/07 20:40:57 matthew Exp $ +# $Id: lonnet.pm,v 1.263 2002/08/08 13:42:01 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -608,6 +608,18 @@ sub userenvironment { return %returnhash; } +# -------------------------------------------------------------------- New chat + +sub chatsend { + my ($newentry,$anon)=@_; + my $cnum=$ENV{'course.'.$ENV{'request.course.id'}.'.num'}; + my $cdom=$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}; + my $chome=$ENV{'course.'.$ENV{'request.course.id'}.'.home'}; + &reply('chatsend:'.$cdom.':'.$cnum.':'. + &escape($ENV{'user.domain'}.':'.$ENV{'user.name'}.':'.$anon.':'. + &escape($newentry)),$chome); +} + # ----------------------------- Subscribe to a resource, return URL if possible sub subscribe { @@ -766,10 +778,15 @@ sub userfileupload { } # Notify homeserver to grep it # -# FIXME - this still needs to happen + if +(&reply('fetchuserfile:'.$docudom.'/'.$docuname.'/'.$fname,$docuhome) eq 'ok') + { # # Return the URL to it - return '/uploaded/'.$path.$fname; + return '/uploaded/'.$path.$fname; + } else { + return '/adm/notfound.html'; + } } # ------------------------------------------------------------------------- Log