--- loncom/interface/lonmsg.pm 2005/06/06 20:31:24 1.147 +++ loncom/interface/lonmsg.pm 2005/06/07 13:42:51 1.149 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging # -# $Id: lonmsg.pm,v 1.147 2005/06/06 20:31:24 www Exp $ +# $Id: lonmsg.pm,v 1.149 2005/06/07 13:42:51 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -596,6 +596,9 @@ sub statuschange { if (($newstatus eq 'deleted') || ($newstatus eq 'new')) { &Apache::lonnet::put('email_status'.$suffix,{$msgid => $newstatus}); } + if ($newstatus eq 'deleted') { + &movemsg(&Apache::lonnet::unescape($msgid),$folder,'trash'); + } } # ============================================================= Make new folder @@ -1777,7 +1780,7 @@ sub displaymessage { ''.&mt('Mark Unread').''. 'Delete'. + '">'.&mt('Delete').''. ''.&mt('Back to Folder Display').''); @@ -1796,11 +1799,11 @@ sub displaymessage { if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { $r->print(''.&Apache::loncommon::track_student_link(&mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check').''); } - if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) { + if ((&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) { my $symb=&Apache::lonnet::symbread($content{'baseurl'}); $r->print(''.&Apache::loncommon::pprmlink(&mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check').''); } - if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'})) { + if ((&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) { my $symb=&Apache::lonnet::symbread($content{'baseurl'}); $r->print(''.&Apache::loncommon::pgrdlink(&mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check').''); }