Diff for /loncom/interface/lonmsgdisplay.pm between versions 1.187 and 1.193

version 1.187, 2019/08/07 16:08:04 version 1.193, 2020/11/11 01:27:04
Line 782  sub groupmail_header { Line 782  sub groupmail_header {
     if ($grouppagelink) {      if ($grouppagelink) {
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
             ({href=>$grouppagelink,              ({href=>$grouppagelink,
               text=>"Group: $description",                text=>&mt('Group').": $description",
               title=>"Go to group's home page"},);                title=>&mt("Go to group's home page"),
                 no_mt=>1,
                },);
     } else {      } else {
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
             ({text=>"Group: $description",});              ({text=>&mt('Group').": $description",
                 no_mt=>1,});
     }      }
     &Apache::lonhtmlcommon::add_breadcrumb         &Apache::lonhtmlcommon::add_breadcrumb   
           ({href=>"/adm/email?compose=group&group=".            ({href=>"/adm/email?compose=group&group=".
Line 799  sub groupmail_header { Line 802  sub groupmail_header {
                            title=>"E-mails sent"},);                             title=>"E-mails sent"},);
     }      }
     my $groupheader = &Apache::loncommon::start_page('Group Message');      my $groupheader = &Apache::loncommon::start_page('Group Message');
     $groupheader .= &Apache::lonhtmlcommon::breadcrumbs      $groupheader .= &Apache::lonhtmlcommon::breadcrumbs(
                 ('Group - '.$env{'form.group'}.' Email');                                      &mt('Group messages - [_1]',$description),
                                                           undef,undef,undef,undef,1);
     return $groupheader;      return $groupheader;
 }  }
   
Line 861  sub discrit { Line 865  sub discrit {
                       .&Apache::lonhtmlcommon::row_closure(1);                        .&Apache::lonhtmlcommon::row_closure(1);
         }          }
         $result .= &Apache::lonhtmlcommon::row_title(&mt('Message'),undef,'LC_evenrow_value')          $result .= &Apache::lonhtmlcommon::row_title(&mt('Message'),undef,'LC_evenrow_value')
                   .'<pre>'.&Apache::lontexconvert::msgtexconverted($content{'message'}).'</pre>'                    .'<pre class="LC_wordwrap">'.&Apache::lontexconvert::msgtexconverted($content{'message'}).'</pre>'
                   .&Apache::lonhtmlcommon::row_closure()                    .&Apache::lonhtmlcommon::row_closure()
                   .&Apache::lonhtmlcommon::row_title('',undef,'LC_oddrow_value')                    .&Apache::lonhtmlcommon::row_title('',undef,'LC_oddrow_value')
                   .'<div class="LC_warning">';                    .'<div class="LC_warning">';
Line 1418  sub compout { Line 1422  sub compout {
     if (!$forwarding && !$multiforward) {      if (!$forwarding && !$multiforward) {
         $attachrow = '<tr><td colspan="3"><b>'.$lt{'atta'}.'</b> '.$attachmax{'text'}          $attachrow = '<tr><td colspan="3"><b>'.$lt{'atta'}.'</b> '.$attachmax{'text'}
             .': <input type="file" name="attachment" class="LC_flUpload" multiple />'              .': <input type="file" name="attachment" class="LC_flUpload" multiple />'
             .'</td></tr>'              .'<input type="hidden" id="LC_free_space" value="'.$attachmax{'num'}.'" />'
             .'<input type="hidden" id="free_space" value="'.$attachmax{'num'}.'" />';              .'</td></tr>';
     }      }
     if (&Apache::lonnet::allowed('srm',$env{'request.course.id'})      if (&Apache::lonnet::allowed('srm',$env{'request.course.id'})
  || &Apache::lonnet::allowed('srm',$env{'request.course.id'}.   || &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
Line 1974  sub disfacetoface { Line 1978  sub disfacetoface {
  &Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).'</b> ('.   &Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).'</b> ('.
 $content{'sendername'}.':'.  $content{'sendername'}.':'.
             $content{'senderdomain'}.') '.$content{'time'}.              $content{'senderdomain'}.') '.$content{'time'}.
             '<br /><pre>'.              '<br /><pre class="LC_wordwrap">'.
               &Apache::lontexconvert::msgtexconverted($content{'message'}).                &Apache::lontexconvert::msgtexconverted($content{'message'}).
       '</pre>';        '</pre>';
      }       }
Line 2143  sub displaymessage { Line 2147  sub displaymessage {
   
   
     my $number_of_messages = scalar(@messages); #subtract 1 for last index      my $number_of_messages = scalar(@messages); #subtract 1 for last index
       my $head_extra;
   
   # if student's view of resource will be included
   # get <link> 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  # start output
     &printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'});      &printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',
                    $content{'baseurl'},$head_extra);
   
 # Prepare available functions  # Prepare available functions
     my @functionlist;      my @functionlist;
Line 2493  sub displaymessage { Line 2517  sub displaymessage {
   
     # Message      # Message
     $r->print(&Apache::lonhtmlcommon::row_title(&mt('Message'))      $r->print(&Apache::lonhtmlcommon::row_title(&mt('Message'))
              .'<pre>'               .'<pre class="LC_wordwrap">'
      .&Apache::lontexconvert::msgtexconverted($content{'message'},1)       .&Apache::lontexconvert::msgtexconverted($content{'message'},1)
      .'</pre>'       .'</pre>'
     );      );
Line 2685  sub displayresource { Line 2709  sub displayresource {
 # ================================================================== The Header  # ================================================================== The Header
   
 sub header {  sub header {
     my ($r,$title,$baseurl)=@_;      my ($r,$title,$baseurl,$head_extra)=@_;
     my $extra = &Apache::loncommon::studentbrowser_javascript();      my $extra = &Apache::loncommon::studentbrowser_javascript();
     if ($baseurl) {      if ($baseurl) {
  $extra .= "<base href=\"".&Apache::lonnet::absolute_url()."/$baseurl\" />";   $extra .= "<base href=\"".&Apache::lonnet::absolute_url()."/$baseurl\" />";
     }      }
     $extra .= '<script type="text/javascript"      $extra .= '<script type="text/javascript"
                 src="/res/adm/includes/file_upload.js"></script>';                  src="/res/adm/includes/file_upload.js"></script>';
       if ($head_extra) {
           $extra .= "\n$head_extra";
       }
     $r->print(&Apache::loncommon::start_page('Messages',      $r->print(&Apache::loncommon::start_page('Messages',
   $extra));    $extra));
     $r->print(&Apache::lonhtmlcommon::breadcrumbs      $r->print(&Apache::lonhtmlcommon::breadcrumbs
Line 2701  sub header { Line 2728  sub header {
 # ---------------------------------------------------------------- Print header  # ---------------------------------------------------------------- Print header
   
 sub printheader {  sub printheader {
     my ($r,$url,$desc,$title,$baseurl)=@_;      my ($r,$url,$desc,$title,$baseurl,$head_extra)=@_;
     &Apache::lonhtmlcommon::add_breadcrumb      &Apache::lonhtmlcommon::add_breadcrumb
  ({href=>$url,   ({href=>$url,
   text=>$desc});    text=>$desc});
     &header($r,$title,$baseurl);      &header($r,$title,$baseurl,$head_extra);
 }  }
   
 # ------------------------------------------------------------ Store the comment  # ------------------------------------------------------------ Store the comment
Line 3009  sub sendoffmail { Line 3036  sub sendoffmail {
                 &Apache::lonnet::logthis('Failed to store To, Bcc and Cc recipients for '.$env{'user.name'}.':'.$env{'user.domain'});                  &Apache::lonnet::logthis('Failed to store To, Bcc and Cc recipients for '.$env{'user.name'}.':'.$env{'user.domain'});
             }              }
             if ($env{'form.attachment'}) {              if ($env{'form.attachment'}) {
                 if (length($env{'form.attachment'})<131072) {                  if (length($env{'form.attachment'}) <= 1048576) {
                     $attachmenturl=&Apache::lonnet::userfileupload('attachment',undef,'feedback/'.$now);                      $attachmenturl=&Apache::lonnet::userfileupload('attachment',undef,'feedback/'.$now);
                 } else {                  } else {
                     $r->print('<p><span class="LC_warning">'.&mt('Attachment not included - exceeded permitted length').'</span><br /></p>');                      $r->print('<p><span class="LC_warning">'.&mt('Attachment not included - exceeded permitted length').'</span><br /></p>');

Removed from v.1.187  
changed lines
  Added in v.1.193


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>