--- loncom/interface/lonmsgdisplay.pm 2008/12/16 22:57:31 1.105 +++ loncom/interface/lonmsgdisplay.pm 2009/01/04 17:43:19 1.107 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.105 2008/12/16 22:57:31 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.107 2009/01/04 17:43:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1813,7 +1813,7 @@ $content{'sendername'}.':'. } # Check to see if there were any messages. if ($result eq '') { - my $lctype = lc(&Apache::loncommon::course_type()); + my $lctype = &mt(lc(&Apache::loncommon::course_type())); if ($target ne 'tex') { $r->print("

".&mt('No notes, face-to-face discussion records, critical messages, or broadcast messages in this [_1].',$lctype)."

"); } else { @@ -2377,7 +2377,16 @@ sub displaymessage { $bcclist = join(', ',@{$recipients{'bcc'}}); } } - if (!$tolist && ref($content{'recuser'}) eq 'ARRAY') { + + my $broadcast_link; + if (($content{'courseid'}) && ($content{'recipid'} && + (ref($recipients{'course_broadcast'}) eq 'ARRAY') || + (ref($recipients{'group_cc_broadcast'}) eq 'ARRAY') || + (ref($recipients{'group_bcc_broadcast'}) eq 'ARRAY'))) { + $broadcast_link = &recipients_link($r,\%content,\%recipients); + } + + if (((!$tolist) && (!$broadcast_link)) && ref($content{'recuser'}) eq 'ARRAY') { my @recipients; for (my $i=0; $i<@{$content{'recuser'}}; $i++) { $recipients[$i] = &Apache::loncommon::aboutmewrapper( @@ -2404,14 +2413,6 @@ sub displaymessage { $r->print(&Apache::loncommon::student_image_tag($content{'senderdomain'},$content{'sendername'}).'
'); } - my $broadcast_link; - if (($content{'courseid'}) && ($content{'recipid'} && - (ref($recipients{'course_broadcast'}) eq 'ARRAY') || - (ref($recipients{'group_cc_broadcast'}) eq 'ARRAY') || - (ref($recipients{'group_bcc_broadcast'}) eq 'ARRAY'))) { - $broadcast_link = &recipients_link($r,\%content,\%recipients); - } - # Display LON-CAPA Message (Start) # Subject $r->print('' @@ -2422,10 +2423,12 @@ sub displaymessage { ); if ($folder eq 'sent') { # To - $r->print(&Apache::lonhtmlcommon::row_title(&mt('To')) - .$tolist - .&Apache::lonhtmlcommon::row_closure() - ); + if ($tolist) { + $r->print(&Apache::lonhtmlcommon::row_title(&mt('To')) + .$tolist + .&Apache::lonhtmlcommon::row_closure() + ); + } if ($cclist) { $r->print(&Apache::lonhtmlcommon::row_title(&mt('Cc')) .$cclist