--- loncom/interface/lonmsgdisplay.pm 2020/11/11 22:04:25 1.181.2.7 +++ loncom/interface/lonmsgdisplay.pm 2016/02/26 21:44:39 1.183 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.181.2.7 2020/11/11 22:04:25 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.183 2016/02/26 21:44:39 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -782,29 +782,25 @@ sub groupmail_header { if ($grouppagelink) { &Apache::lonhtmlcommon::add_breadcrumb ({href=>$grouppagelink, - text=>&mt('Group').": $description", - title=>&mt("Go to group's home page"), - no_mt=>1, - },); + text=>"Group: $description", + title=>"Go to group's home page"},); } else { &Apache::lonhtmlcommon::add_breadcrumb - ({text=>&mt('Group').": $description", - no_mt=>1,}); + ({text=>"Group: $description",}); } - &Apache::lonhtmlcommon::add_breadcrumb - ({href=>"/adm/email?compose=group&group=". - "$env{'form.group'}&$refarg", - text=>"Send a Message in a Group", - title=>"Compose Group Message"},); + &Apache::lonhtmlcommon::add_breadcrumb + ({href=>"/adm/email?compose=group&group=". + "$env{'form.group'}&$refarg", + text=>"Send a Message in a Group", + title=>"Compose Group Message"},); if ($action eq 'sending') { &Apache::lonhtmlcommon::add_breadcrumb ({text=>"Messages being sent.", title=>"E-mails sent"},); } my $groupheader = &Apache::loncommon::start_page('Group Message'); - $groupheader .= &Apache::lonhtmlcommon::breadcrumbs( - &mt('Group messages - [_1]',$description), - undef,undef,undef,undef,1); + $groupheader .= &Apache::lonhtmlcommon::breadcrumbs + ('Group - '.$env{'form.group'}.' Email'); return $groupheader; } @@ -865,7 +861,7 @@ sub discrit { .&Apache::lonhtmlcommon::row_closure(1); } $result .= &Apache::lonhtmlcommon::row_title(&mt('Message'),undef,'LC_evenrow_value') - .'
'.&Apache::lontexconvert::msgtexconverted($content{'message'}).'
' + .'
'.&Apache::lontexconvert::msgtexconverted($content{'message'}).'
' .&Apache::lonhtmlcommon::row_closure() .&Apache::lonhtmlcommon::row_title('',undef,'LC_oddrow_value') .'
'; @@ -1421,9 +1417,9 @@ sub compout { ); if (!$forwarding && !$multiforward) { $attachrow = ''.$lt{'atta'}.' '.$attachmax{'text'} - .': ' - .'' - .''; + .': ' + .'' + .''; } if (&Apache::lonnet::allowed('srm',$env{'request.course.id'}) || &Apache::lonnet::allowed('srm',$env{'request.course.id'}. @@ -1978,7 +1974,7 @@ sub disfacetoface { &Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).' ('. $content{'sendername'}.':'. $content{'senderdomain'}.') '.$content{'time'}. - '
'.
+            '
'.
               &Apache::lontexconvert::msgtexconverted($content{'message'}).
 	      '
'; } @@ -2147,28 +2143,8 @@ sub displaymessage { my $number_of_messages = scalar(@messages); #subtract 1 for last index - my $head_extra; - -# if student's view of resource will be included -# get tag(s) for css file(s) in use, and pass to &header to include -# in call to loncommon::start_page() - - if (($env{'request.course.id'} eq $content{'courseid'}) && - (&Apache::lonnet::allowed('vgr',$content{'courseid'}))) { - my $symb; - if (defined($content{'symb'})) { - $symb = $content{'symb'}; - } elsif (defined($content{'baseurl'})) { - $symb=&Apache::lonnet::symbread($content{'baseurl'}); - } - if ($symb) { - $head_extra = &Apache::loncommon::css_links($symb); - } - } - # start output - &printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','', - $content{'baseurl'},$head_extra); + &printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'}); # Prepare available functions my @functionlist; @@ -2213,8 +2189,7 @@ sub displaymessage { my @actionlist; if ($env{'user.adv'}) { - if (($env{'request.course.id'}) && ($from_student) && - (&Apache::lonnet::allowed('vgr',$env{'request.course.id'}))) { + if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { push(@actionlist,&Apache::loncommon::track_student_link( 'View recent activity' ,$content{'sendername'} @@ -2517,7 +2492,7 @@ sub displaymessage { # Message $r->print(&Apache::lonhtmlcommon::row_title(&mt('Message')) - .'
'
+             .'
'
 	     .&Apache::lontexconvert::msgtexconverted($content{'message'},1)
 	     .'
' ); @@ -2702,16 +2677,13 @@ sub displayresource { # ================================================================== The Header sub header { - my ($r,$title,$baseurl,$head_extra)=@_; + my ($r,$title,$baseurl)=@_; my $extra = &Apache::loncommon::studentbrowser_javascript(); if ($baseurl) { $extra .= ""; } $extra .= ''; - if ($head_extra) { - $extra .= "\n$head_extra"; - } $r->print(&Apache::loncommon::start_page('Messages', $extra)); $r->print(&Apache::lonhtmlcommon::breadcrumbs @@ -2721,11 +2693,11 @@ sub header { # ---------------------------------------------------------------- Print header sub printheader { - my ($r,$url,$desc,$title,$baseurl,$head_extra)=@_; + my ($r,$url,$desc,$title,$baseurl)=@_; &Apache::lonhtmlcommon::add_breadcrumb ({href=>$url, text=>$desc}); - &header($r,$title,$baseurl,$head_extra); + &header($r,$title,$baseurl); } # ------------------------------------------------------------ Store the comment @@ -2952,7 +2924,7 @@ sub sendoffmail { &Apache::lonnet::logthis('Failed to store To, Bcc and Cc recipients for '.$env{'user.name'}.':'.$env{'user.domain'}); } if ($env{'form.attachment'}) { - if (length($env{'form.attachment'}) <= 1048576) { + if (length($env{'form.attachment'})<131072) { $attachmenturl=&Apache::lonnet::userfileupload('attachment',undef,'feedback/'.$now); } else { $r->print('

'.&mt('Attachment not included - exceeded permitted length').'

');