Diff for /loncom/interface/lonmsgdisplay.pm between versions 1.95 and 1.101

version 1.95, 2008/11/04 06:22:53 version 1.101, 2008/12/07 19:29:29
Line 243  function folder_choice(targetform,caller Line 243  function folder_choice(targetform,caller
   </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>    </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
   <td align="right">    <td align="right">
    <table><tr><td><br />     <table><tr><td><br />
     <input type="button" value="'.&mt('Make New Folder').      <input type="button" value="'.&mt('New Folder').
     '" onClick="javascript:folder_choice(this.form,'."'new'".');" /></td>'.      '" onClick="javascript:folder_choice(this.form,'."'new'".');" /></td>'.
     '<td align="center"><b>'.&mt('New Folder').'</b><br />'.      '<td align="center"><b>'.&mt('Name').'</b><br />'.
     '<input type="text" size="15" name="newfolder" value="" />      '<input type="text" size="15" name="newfolder" value="" />
     </td></tr></table>      </td></tr></table>
   </td>    </td>
Line 353  sub makefolder { Line 353  sub makefolder {
         }          }
     } else {      } else {
         $outcome =           $outcome = 
     &mt('Error - could not obtain lock on email folders record.');      &mt('Error - could not obtain lock on e-mail folders record.');
     }      }
     return ($outcome,$warning);      return ($outcome,$warning);
 }  }
Line 559  sub disgroup { Line 559  sub disgroup {
     my $result;      my $result;
     #  Needs to be in a course      #  Needs to be in a course
     if (!($env{'request.course.fn'})) {      if (!($env{'request.course.fn'})) {
         $result = &mt('Error: you must have a course role selected to be able to send a broadcast message to a group in the course.');          $result = &mt('Error: you must have a course role selected to be able to send a broadcast 
   e-mail to a group in the course.');
         return $result;          return $result;
     }      }
     if ($cdom eq '' || $cnum eq '') {      if ($cdom eq '' || $cnum eq '') {
Line 717  sub groupmail_header { Line 718  sub groupmail_header {
          {href=>"/adm/email?compose=group&amp;group=".           {href=>"/adm/email?compose=group&amp;group=".
                 "$env{'form.group'}&amp;$refarg",                  "$env{'form.group'}&amp;$refarg",
           text=>"Send a Message in a Group",            text=>"Send a Message in a Group",
           title=>"Compose Group Email Message"},);            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=>"Messages sent"},);                             title=>"E-mails sent"},);
     }      }
     my $groupheader = &Apache::loncommon::start_page('Group Email');      my $groupheader = &Apache::loncommon::start_page('Group Message');
     $groupheader .= &Apache::lonhtmlcommon::breadcrumbs      $groupheader .= &Apache::lonhtmlcommon::breadcrumbs
                 ('Group - '.$env{'form.group'}.' Email');                  ('Group - '.$env{'form.group'}.' Email');
     return $groupheader;      return $groupheader;
Line 737  sub groupmail_sent { Line 738  sub groupmail_sent {
     }      }
     my $output .= '<br /><br /><a href="/adm/email?compose=group&amp;group='.      my $output .= '<br /><br /><a href="/adm/email?compose=group&amp;group='.
                   $group.'&amp;'.$refarg.'">'.                    $group.'&amp;'.$refarg.'">'.
                   &mt('Send another group email').'</a>'.'&nbsp;&nbsp;&nbsp;'.                    &mt('Send another group message').'</a>'.'&nbsp;&nbsp;&nbsp;'.
                   '<a href="/adm/'.$cdom.'/'.$cnum.'/'.$group.'/smppg?'.                    '<a href="/adm/'.$cdom.'/'.$cnum.'/'.$group.'/smppg?'.
                   $refarg.'">'. &mt('Return to group page').'</a>';                    $refarg.'">'. &mt('Return to group page').'</a>';
     return $output;      return $output;
Line 1286  sub compout { Line 1287  sub compout {
          $dispcrit=           $dispcrit=
  '<span class="LC_nobreak"><label><input type="checkbox" name="critmsg" /> '.&mt('Send as critical message').'.</label>'.$crithelp.'&nbsp;&nbsp;'.&mt('Require return receipt?').'<label><input type="radio" name="sendbck" value="1" />'.&mt('Yes').'</label>&nbsp;&nbsp;<label><input type="radio" name="sendbck" value="" checked="checked" />'.&mt('No').'</label></span><br />'.   '<span class="LC_nobreak"><label><input type="checkbox" name="critmsg" /> '.&mt('Send as critical message').'.</label>'.$crithelp.'&nbsp;&nbsp;'.&mt('Require return receipt?').'<label><input type="radio" name="sendbck" value="1" />'.&mt('Yes').'</label>&nbsp;&nbsp;<label><input type="radio" name="sendbck" value="" checked="checked" />'.&mt('No').'</label></span><br />'.
  '<label><input type="checkbox" name="permanent" /> '.   '<label><input type="checkbox" name="permanent" /> '.
 &mt('Send copy to permanent email address (if known)').'</label><br />'.  &mt('Send copy to permanent e-mail address (if known)').'</label><br />'.
 '<label><input type="checkbox" name="rsspost" /> '.  '<label><input type="checkbox" name="rsspost" /> '.
   &mt('Include in course RSS newsfeed').'</label><br />';    &mt('Include in course RSS newsfeed').'</label><br />';
     }      }
Line 1675  ENDADD Line 1676  ENDADD
 sub submit_button_row {  sub submit_button_row {
     my ($folder,$dismode,$sendtext,$lt,$is_crsform,$group) = @_;      my ($folder,$dismode,$sendtext,$lt,$is_crsform,$group) = @_;
     my $pre=&mt("Show Preview and Check Spelling");      my $pre=&mt("Show Preview and Check Spelling");
       my $value=&mt('Send');
     my $prevbutton = '<input type="button" name="preview" value="'.$pre.'" onclick="if (typeof(document.compemail.onsubmit)=='."'function'".') {document.compemail.onsubmit();};document.preview.comment.value=document.compemail.message.value;document.preview.subject.value=document.compemail.subject.value;document.preview.submit();" />';      my $prevbutton = '<input type="button" name="preview" value="'.$pre.'" onclick="if (typeof(document.compemail.onsubmit)=='."'function'".') {document.compemail.onsubmit();};document.preview.comment.value=document.compemail.message.value;document.preview.subject.value=document.compemail.subject.value;document.preview.submit();" />';
     my $output = qq|      my $output = qq|
 <input type="hidden" name="folder" value="$folder" />  <input type="hidden" name="folder" value="$folder" />
Line 1687  sub submit_button_row { Line 1689  sub submit_button_row {
     }      }
     $output .= qq|      $output .= qq|
 <table><tr><td align="left">  <table><tr><td align="left">
 <input type="submit" name="send" value="$sendtext" />  <input type="submit" name="send" value="$value" title="$sendtext" />
 <input type="submit" name="cancel" value="$lt->{'ca'}" />  <input type="submit" name="cancel" value="$lt->{'ca'}" />
 </td><td width="60">&nbsp;</td><td align="right">$prevbutton</td></tr></table>  </td><td width="60">&nbsp;</td><td align="right">$prevbutton</td></tr></table>
 |;  |;
Line 2261  sub displaymessage { Line 2263  sub displaymessage {
 # 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'});
     my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'});      my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'});
 # Functions  
     $r->print('<table border="2" width="100%"><tr bgcolor="#FFFFAA"><td>'.&mt('Functions').':</td>');  # Functions and Actions
       my $li_start='<span class="LC_nobreak">&bull; ';
       my $li_end='</span> ';
   
   # Prepare available functions
       my $functionlist='';
     if (!$content{'noreplies'}) {      if (!$content{'noreplies'}) {
         $r->print('<td><a href="/adm/email?replyto='.&escape($msgid).$sqs.          $functionlist.=$li_start
           '"><b>'.&mt('Reply').'</b></a></td>');                       .'<a href="/adm/email?replyto='.&escape($msgid).$sqs.'">'
     }                       .&mt('Reply')
     $r->print('<td><a href="/adm/email?forward='.&escape($msgid).$sqs.                       .'</a>'
       '"><b>'.&mt('Forward').'</b></a></td>'.                       .$li_end;
       '<td><a href="/adm/email?markunread='.&escape($msgid).$sqs.      }
       '"><b>'.&mt('Mark Unread').'</b></a></td>'.      $functionlist.=$li_start
       '<td><a href="/adm/email?markdel='.&escape($msgid).$sqs.                    .'<a href="/adm/email?forward='.&escape($msgid).$sqs.'">'
       '"><b>'.&mt('Delete').'</b></a></td>'.                    .&mt('Forward')
       '<td><a href="/adm/email?'.$sqs.                    .'</a>'
       '"><b>'.&mt('Back to Folder Display').'</b></a></td>');                    .$li_end;
       $functionlist.=$li_start
                     .'<a href="/adm/email?markunread='.&escape($msgid).$sqs.'">'
                     .&mt('Mark Unread')
                     .'</a>'
                     .$li_end;
       $functionlist.=$li_start
                     .'<a href="/adm/email?markdel='.&escape($msgid).$sqs.'">'
                     .&mt('Delete')
                     .'</a>'
                     .$li_end;
       $functionlist.=$li_start
                     .'<a href="/adm/email?'.$sqs.'">'
                     .&mt('Back to Folder Display')
                     .'</a>'
                     .$li_end;
     if ($counter > 0){      if ($counter > 0){
  $r->print('<td><a href="/adm/email?display='.$messages[$counter-1]->[5].$sqs.          $functionlist.=$li_start
   '"><b>'.&mt('Previous').'</b></a></td>');                .'<a href="/adm/email?display='.$messages[$counter-1]->[5].$sqs.'">'
                 .&mt('Previous')
                 .'</a>'
                 .$li_end;
     }      }
     if ($counter < $number_of_messages - 1){      if ($counter < $number_of_messages - 1){
  $r->print('<td><a href="/adm/email?display='.$messages[$counter+1]->[5].$sqs.          $functionlist.=$li_start
   '"><b>'.&mt('Next').'</b></a></td>');                .'<a href="/adm/email?display='.$messages[$counter+1]->[5].$sqs.'">'
     }                .&mt('Next')
     $r->print('</tr></table>');                .'</a>'
                 .$li_end;
       }
   # Print functions
       $r->print('<div>'
                .'<fieldset>'
                .'<legend>'
                .&mt('Functions')
                .'</legend>'
                .$functionlist
                .'</fieldset>'
                .'</div>'
       );
   
   # Prepare available actions
     my $symb;      my $symb;
     if (defined($content{'symb'})) {      if (defined($content{'symb'})) {
         $symb = $content{'symb'};          $symb = $content{'symb'};
Line 2292  sub displaymessage { Line 2331  sub displaymessage {
     }      }
     if ($env{'user.adv'}) {      if ($env{'user.adv'}) {
         my $actionlist='';          my $actionlist='';
   
  if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {   if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
  $actionlist.='<td><b>'   $actionlist.=$li_start
                             .&Apache::loncommon::track_student_link(                              .&Apache::loncommon::track_student_link(
                                  &mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check')                                   &mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check')
                             .'</b></td>';                              .$li_end;
  }   }
  if (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) {   if (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) {
     $actionlist.='<td><b>'      $actionlist.=$li_start
                         .&Apache::loncommon::pprmlink(                          .&Apache::loncommon::pprmlink(
                              &mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check')                               &mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check')
                         .'</b></td>';                          .$li_end;
  }   }
  if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) {   if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) {
     $actionlist.='<td><b>'      $actionlist.=$li_start
                        .&Apache::loncommon::pgrdlink(                         .&Apache::loncommon::pgrdlink(
                             &mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check')                              &mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check')
                        .'</b></td>';                         .$li_end;
  }   }
   
   # Print actions
         if ($actionlist) {          if ($actionlist) {
             $r->print('<table border="2" width="100%">'              $r->print('<div>'
                      .'<tr bgcolor="#FFAAAA"><td>'                       .'<fieldset>'
                        .'<legend>'
                      .&mt('Currently available actions (will open extra window):')                       .&mt('Currently available actions (will open extra window):')
                      .'</td>'                       .'</legend>'
                      .$actionlist                       .$actionlist
                      .'</tr></table>');                       .'</fieldset>'
                        .'</div>'
               );
         }          }
     }      }
   
     my ($tonum,$tolist,$cclist,$bcclist,$groupcclist,%recipients);      my ($tonum,$tolist,$cclist,$bcclist,$groupcclist,%recipients);
     if ($content{'recipid'}) {      if ($content{'recipid'}) {
         $tonum = &retrieve_recips('display',\%content,\%recipients);          $tonum = &retrieve_recips('display',\%content,\%recipients);

Removed from v.1.95  
changed lines
  Added in v.1.101


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