[LON-CAPA-cvs] cvs: loncom /interface lonmsg.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 05 Dec 2003 22:14:15 -0000


albertel		Fri Dec  5 17:14:15 2003 EDT

  Modified files:              
    /loncom/interface	lonmsg.pm 
  Log:
  - Fixes, BUG#2419, (author's not seeing error messages), but only by converting to error messages, delaying real fix to 1.2 (BUG#2444)
  
  
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.70 loncom/interface/lonmsg.pm:1.71
--- loncom/interface/lonmsg.pm:1.70	Sat Oct 18 12:33:44 2003
+++ loncom/interface/lonmsg.pm	Fri Dec  5 17:14:15 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.70 2003/10/18 16:33:44 www Exp $
+# $Id: lonmsg.pm,v 1.71 2003/12/05 22:14:15 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -270,16 +270,22 @@
     my ($filename,$message)=@_;
     unless ($message) { return 'empty'; }
     $filename=&Apache::lonnet::declutter($filename);
-    my ($domain,$author,@dummy)=split(/\//,$filename);
+    my ($domain,$author)=split(/\//,$filename);
     my $homeserver=&Apache::lonnet::homeserver($author,$domain);
     if ($homeserver ne 'no_host') {
        my $id=unpack("%32C*",$message);
        my $msgid;
-       ($msgid,$message)=&packagemsg($filename,$message);
+       ($msgid,$message)=&packagemsg("Error: [$filename]",$message);
+       #FIXME this should be nohist_res_msg, we need to provide an interface 
+       #      to this hash BUG#2444
+       #return &Apache::lonnet::reply('put:'.$domain.':'.$author.
+       #  ':nohist_res_msg:'.
+       #   &Apache::lonnet::escape($filename.'_'.$id).'='.
+       #   &Apache::lonnet::escape($message),$homeserver);
        return &Apache::lonnet::reply('put:'.$domain.':'.$author.
-         ':nohist_res_msgs:'.
-          &Apache::lonnet::escape($filename.'_'.$id).'='.
-          &Apache::lonnet::escape($message),$homeserver);
+	   ':nohist_email:'.
+           &Apache::lonnet::escape($msgid).'='.
+           &Apache::lonnet::escape($message),$homeserver);
     }
     return 'no_host';
 }