--- loncom/interface/lonmsgdisplay.pm 2010/11/20 13:06:58 1.155 +++ loncom/interface/lonmsgdisplay.pm 2011/05/03 10:37:14 1.156 @@ -1,7 +1,7 @@ # $textareaclass The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.155 2010/11/20 13:06:58 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.156 2011/05/03 10:37:14 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -814,6 +814,7 @@ sub discrit { foreach my $key (sort(keys(%what))) { my %content=&Apache::lonmsg::unpackagemsg($what{$key}); next if ($content{'senderdomain'} eq ''); + my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'}); $result .= &Apache::lonhtmlcommon::start_pick_box() .&Apache::lonhtmlcommon::row_title(&mt('From'),undef,'LC_oddrow_value') .''.&Apache::loncommon::aboutmewrapper( @@ -825,8 +826,13 @@ sub discrit { .&Apache::lonhtmlcommon::row_closure(1) .&Apache::lonhtmlcommon::row_title(&mt('Subject'),undef,'LC_oddrow_value') .$content{'subject'} - .&Apache::lonhtmlcommon::row_closure(1) - .&Apache::lonhtmlcommon::row_title(&mt('Message'),undef,'LC_evenrow_value') + .&Apache::lonhtmlcommon::row_closure(1); + if ($courseinfo{'description'}) { + $result .= &Apache::lonhtmlcommon::row_title(&mt('Course'),undef,'LC_oddrow_value') + .$courseinfo{'description'} + .&Apache::lonhtmlcommon::row_closure(1); + } + $result .= &Apache::lonhtmlcommon::row_title(&mt('Message'),undef,'LC_evenrow_value') .'
'.&Apache::lontexconvert::msgtexconverted($content{'message'}).'
' .&Apache::lonhtmlcommon::row_closure() .&Apache::lonhtmlcommon::row_title('',undef,'LC_oddrow_value')