Diff for /loncom/interface/lonmsgdisplay.pm between versions 1.81 and 1.85

version 1.81, 2007/07/17 18:35:54 version 1.85, 2008/02/22 18:08:35
Line 555  sub disgroup { Line 555  sub disgroup {
                       'recipients to select.');                        'recipients to select.');
         return $result;          return $result;
     } else {      } else {
         $result = &mt('Select message recipients from the group members listed below.<br />');            $result = &mt('Select message recipients from the group members listed below.').'<br />';  
         my %Sortby = (          my %Sortby = (
                          active   => {},                           active   => {},
                          previous => {},                           previous => {},
Line 737  $content{'sendername'}.':'. Line 737  $content{'sendername'}.':'.
             '<br />'.&mt('Subject').': '.$content{'subject'}.              '<br />'.&mt('Subject').': '.$content{'subject'}.
             '<br /><pre>'.              '<br /><pre>'.
               &Apache::lontexconvert::msgtexconverted($content{'message'}).                &Apache::lontexconvert::msgtexconverted($content{'message'}).
             '</pre><small>';              '</pre><div class="LC_error">';
         my ($rec_button,$reprec_button);          my ($rec_button,$reprec_button);
         $rec_button = &mt('Move to Inbox');          $rec_button = &mt('Move to Inbox');
         if (!$content{'noreplies'}) {          if (!$content{'noreplies'}) {
Line 752  $content{'sendername'}.':'. Line 752  $content{'sendername'}.':'.
         } else {          } else {
             $result .= &mt('Access to other pages will be prevented until you have moved the message to your inbox.');               $result .= &mt('Access to other pages will be prevented until you have moved the message to your inbox.'); 
         }          }
         $result .= '</small><br />'.          $result .= '</div><br />'.
             '<input type="submit" name="rec_'.$key.'" value="'.$rec_button.'" />';              '<input type="submit" name="rec_'.$key.'" value="'.$rec_button.'" />';
         if (!$content{'noreplies'}) {          if (!$content{'noreplies'}) {
             $result .= '<input type="submit" name="reprec_'.$key.'" '.              $result .= '<input type="submit" name="reprec_'.$key.'" '.
Line 929  sub disfolder { Line 929  sub disfolder {
 <script type="text/javascript">  <script type="text/javascript">
     $jscript      $jscript
   
     function checkfoldermove() {  
         if (document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value == 'markedmove') {  
             if (document.disall.movetofolder.options[document.disall.movetofolder.selectedIndex].value == "") {  
                 alert("$lt{'sede'}");  
                 return;  
             }  
         }  
         return;   
     }  
   
     function validate_checkedaction() {      function validate_checkedaction() {
         document.disall.markedaction.value = document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value;          document.disall.markedaction.value = document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value;
         if (document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value == 'markedmove') {          if (document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value == 'markedmove') {
Line 1110  ENDDISHEADER Line 1100  ENDDISHEADER
   '<input type="button" onclick="javascript:uncheckAll(document.disall.delmark)" value="'.&mt('Uncheck All').'" />'."\n".    '<input type="button" onclick="javascript:uncheckAll(document.disall.delmark)" value="'.&mt('Uncheck All').'" />'."\n".
   '<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" /></td><td>&nbsp;</td>'."\n".    '<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" /></td><td>&nbsp;</td>'."\n".
   '<td align="center"><b>'.&mt('Action').'</b><br />'."\n".    '<td align="center"><b>'.&mt('Action').'</b><br />'."\n".
   '  <select name="checkedaction" onchange="javascript:checkfoldermove()">'."\n");    '  <select name="checkedaction">'."\n");
   
     if ($folder ne 'trash') {      if ($folder ne 'trash') {
         $r->print('    <option value="markeddel">'.&mt('Delete').'</option>'."\n");          $r->print('    <option value="markeddel">'.&mt('Delete').'</option>'."\n");
Line 1204  sub compout { Line 1194  sub compout {
         &printheader($r,'/adm/email?compose=multiforward',          &printheader($r,'/adm/email?compose=multiforward',
              'Forwarding Multiple Messages');               'Forwarding Multiple Messages');
         if ($multiforward > 1) {          if ($multiforward > 1) {
             $r->print(&mt('Each of the <b>[quant,_1,message]</b> you checked              $r->print(&mt('Each of the <b>[quant,_1,message]</b> you checked'
 will be forwarded to the recipient(s) you select below.',$multiforward).'<br />');                           .' will be forwarded to the recipient(s) you select below.',$multiforward)
                       .'<br />');
         } else {          } else {
             $r->print(&mt('The message you checked will be forwarded to the recipient(s) you select below.').'<br />');              $r->print(&mt('The message you checked will be forwarded to the recipient(s) you select below.').'<br />');
         }          }
Line 1514  ENDREP Line 1505  ENDREP
 sub additional_rec_row {  sub additional_rec_row {
     my ($lt) = @_;      my ($lt) = @_;
     my $cc = &mt('Cc:');      my $cc = &mt('Cc:');
     my $bcc = &mt('Bcc:');       my $bcc = &mt('Bcc:');
       my $exmpl = &mt('username:domain,username:domain,...'); 
     my $output = <<"ENDADD";      my $output = <<"ENDADD";
 <tr><td>$lt->{'ad'} :<br /><tt>username:domain,username:domain, ...  <tr><td>$lt->{'ad'} :<br /><tt>($exmpl)
 </tt></td><td>&nbsp;<span class="LC_nobreak">$cc   </tt></td><td>&nbsp;<span class="LC_nobreak">$cc 
 <input type="text" size="50" name="additionalrec_cc" /></span><br />  <input type="text" size="50" name="additionalrec_cc" /></span><br />
 <span class="LC_nobreak">$bcc <input type="text" size="50" name="additionalrec_bcc" /></span></td></tr>  <span class="LC_nobreak">$bcc <input type="text" size="50" name="additionalrec_bcc" /></span></td></tr>
Line 2073  sub displaymessage { Line 2065  sub displaymessage {
  $counter++;   $counter++;
     }      }
     $r->print('</pre>');      $r->print('</pre>');
   
       my $see_anonymous;
       my $from_student = 0;
       if ($env{'request.course.id'} eq $content{'courseid'}) {
    my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
    my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
    my $username = $content{'sendername'}.':'.$content{'senderdomain'};
    my %classlist_entry =
       &Apache::lonnet::get('classlist',[$username],$cdom,$cnum);
    if (exists($classlist_entry{$username})) {
       $from_student = 1;
       $see_anonymous = &Apache::lonnet::allowed('rin',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''));
    }
       }
   
   
     my $number_of_messages = scalar(@messages); #subtract 1 for last index      my $number_of_messages = scalar(@messages); #subtract 1 for last index
 # 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'});
Line 2107  sub displaymessage { Line 2115  sub displaymessage {
         $symb=&Apache::lonnet::symbread($content{'baseurl'});          $symb=&Apache::lonnet::symbread($content{'baseurl'});
     }      }
     if ($env{'user.adv'}) {      if ($env{'user.adv'}) {
    my $adv_actions;
  $r->print('<table border="2" width="100%"><tr bgcolor="#FFAAAA"><td>'.&mt('Currently available actions (will open extra window)').':</td>');   $r->print('<table border="2" width="100%"><tr bgcolor="#FFAAAA"><td>'.&mt('Currently available actions (will open extra window)').':</td>');
  if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {   if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
  $r->print('<td><b>'.&Apache::loncommon::track_student_link(&mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check').'</b></td>');   $r->print('<td><b>'.&Apache::loncommon::track_student_link(&mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check').'</b></td>');
Line 2146  sub displaymessage { Line 2155  sub displaymessage {
     if (defined($content{'baseurl'})) {      if (defined($content{'baseurl'})) {
         $baseurl = &Apache::lonenc::check_encrypt($content{'baseurl'});          $baseurl = &Apache::lonenc::check_encrypt($content{'baseurl'});
     }      }
     $r->print(&Apache::loncommon::student_image_tag($content{'senderdomain'},$content{'sendername'}));      if ($from_student && $see_anonymous ) {
    $r->print(&Apache::loncommon::student_image_tag($content{'senderdomain'},$content{'sendername'}));
       }
   
     $r->print('<br /><b>'.&mt('Subject').':</b> '.$content{'subject'});      $r->print('<br /><b>'.&mt('Subject').':</b> '.$content{'subject'});
     if ($folder eq 'sent') {      if ($folder eq 'sent') {
         $r->print('<br /><b>'.&mt('To').':</b> '.$tolist);          $r->print('<br /><b>'.&mt('To').':</b> '.$tolist);
Line 2617  sub sendoffmail { Line 2629  sub sendoffmail {
         }          }
             } else {              } else {
         $r->print('<p><span class="LC_error">'.&mt('Could not deliver message').'</span> '.          $r->print('<p><span class="LC_error">'.&mt('Could not deliver message').'</span> '.
           &mt('Please use the browser "Back" button and correct the recipient addresses '."($sendstatus)").'</p>');            &mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus).'</p>');
             }              }
         }          }
     }      }

Removed from v.1.81  
changed lines
  Added in v.1.85


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