--- loncom/interface/lonmsg.pm 2003/12/29 21:21:39 1.72 +++ loncom/interface/lonmsg.pm 2003/12/30 14:57:49 1.73 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging # -# $Id: lonmsg.pm,v 1.72 2003/12/29 21:21:39 www Exp $ +# $Id: lonmsg.pm,v 1.73 2003/12/30 14:57:49 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -284,6 +284,37 @@ sub author_res_msg { return 'no_host'; } +# =========================================== Retrieve author resource messages + +sub retrieve_author_res_msg { + my ($author,$domain,$url)=@_; + $url=&Apache::lonnet::declutter($url); + my %errormsgs=&Apache::lonnet::dump('nohist_res_msgs',$1,$2); + my $msgs=''; + foreach (keys %errormsgs) { + if ($_=~/^\Q$url\E\_\d+$/) { + my %content=&unpackagemsg($errormsgs{$_}); + $msgs.=''.$content{'time'}.': '.$content{'message'}. + '
'; + } + } + return $msgs; +} + + +# =============================== Delete all author messages related to one URL + +sub del_url_author_res_msg { + my ($author,$domain,$url)=@_; + $url=&Apache::lonnet::declutter($url); +} + +# ================= Return hash with URLs for which there is a resource message + +sub all_url_author_res_msg { + my ($author,$domain)=@_; +} + # ================================================== Critical message to a user sub user_crit_msg_raw {