Diff for /loncom/interface/lonmsgdisplay.pm between versions 1.181 and 1.181.2.6

version 1.181, 2015/06/09 21:22:56 version 1.181.2.6, 2020/09/09 00:48:17
Line 102  use HTML::TokeParser(); Line 102  use HTML::TokeParser();
 use Apache::Constants qw(:common);  use Apache::Constants qw(:common);
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonhtmlcommon();  use Apache::lonhtmlcommon();
   use Apache::longroup;
   use Apache::lonnavmaps;
 use Apache::lontexconvert();  use Apache::lontexconvert();
 use HTML::Entities();  use HTML::Entities();
 use Apache::lonlocal;  use Apache::lonlocal;
Line 773  sub groupmail_header { Line 775  sub groupmail_header {
               text=>"Groups",                text=>"Groups",
               title=>$brtitle});                title=>$brtitle});
     }      }
       my $view_permission =
             &Apache::lonnet::allowed('vcg',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''));
       my $navmap=Apache::lonnavmaps::navmap->new();
       my $grouppagelink = &Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap,$view_permission,$refarg);
       if ($grouppagelink) {
           &Apache::lonhtmlcommon::add_breadcrumb
               ({href=>$grouppagelink,
                 text=>&mt('Group').": $description",
                 title=>&mt("Go to group's home page"),
                 no_mt=>1,
                },);
       } else {
           &Apache::lonhtmlcommon::add_breadcrumb
               ({text=>&mt('Group').": $description",
                 no_mt=>1,});
       }
     &Apache::lonhtmlcommon::add_breadcrumb      &Apache::lonhtmlcommon::add_breadcrumb
         ({href=>"/adm/$cdom/$cnum/$group/smppg?$refarg",           ({href=>"/adm/email?compose=group&group=".
           text=>"Group: $description",                   "$env{'form.group'}&$refarg",
           title=>"Go to group's home page"},             text=>"Send a Message in a Group",
          {href=>"/adm/email?compose=group&group=".             title=>"Compose Group Message"},);
                 "$env{'form.group'}&$refarg",  
           text=>"Send a Message in a Group",  
           title=>"Compose Group Message"},);  
     if ($action eq 'sending') {      if ($action eq 'sending') {
             &Apache::lonhtmlcommon::add_breadcrumb              &Apache::lonhtmlcommon::add_breadcrumb
                          ({text=>"Messages being sent.",                           ({text=>"Messages being sent.",
                            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 849  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 1400  sub compout { Line 1416  sub compout {
                                        'to'   => 'To:',                                         'to'   => 'To:',
                                       );                                        );
     my %attachmax = (      my %attachmax = (
                      text => &mt('(128 KB max size)'),                       text => &mt('(1 MB max size)'),
                      num  => 131072,                       num  => 1048576,
                     );                      );
     if (!$forwarding && !$multiforward) {      if (!$forwarding && !$multiforward) {
         $attachrow = '<tr><td colspan="3"><b>'.$lt{'atta'}.'</b> '.$attachmax{'text'}.': <input type="file" name="attachment" /></td></tr>';          $attachrow = '<tr><td colspan="3"><b>'.$lt{'atta'}.'</b> '.$attachmax{'text'}
               .': <input type="file" name="attachment" class="LC_flUpload" />'
               .'<input type="hidden" id="LC_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 1959  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 2174  sub displaymessage { Line 2193  sub displaymessage {
     my @actionlist;      my @actionlist;
     if ($env{'user.adv'}) {      if ($env{'user.adv'}) {
   
  if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {   if (($env{'request.course.id'}) && ($from_student) &&
               (&Apache::lonnet::allowed('vgr',$env{'request.course.id'}))) {
  push(@actionlist,&Apache::loncommon::track_student_link(   push(@actionlist,&Apache::loncommon::track_student_link(
                                       'View recent activity'                                        'View recent activity'
                                      ,$content{'sendername'}                                       ,$content{'sendername'}
Line 2477  sub displaymessage { Line 2497  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 2667  sub header { Line 2687  sub header {
     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"
                   src="/res/adm/includes/file_upload.js"></script>';
     $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 2907  sub sendoffmail { Line 2929  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.181  
changed lines
  Added in v.1.181.2.6


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