Diff for /loncom/interface/loncommunicate.pm between versions 1.44 and 1.48

version 1.44, 2008/12/10 14:36:36 version 1.48, 2022/01/18 17:33:13
Line 42  sub menu { Line 42  sub menu {
     my $usertype = 'student';      my $usertype = 'student';
     if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {      if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
         $crstype = $env{'course.'.$env{'request.course.id'}.'.type'};          $crstype = $env{'course.'.$env{'request.course.id'}.'.type'};
         if ($crstype eq 'Group') {          if ($crstype eq 'Community') {
             $usertype = 'member';              $usertype = 'member';
         }             }   
     }      }
   
       my $clientip = &Apache::lonnet::get_requestor_ip($r);
       my %setters;
       my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) =
           &Apache::loncommon::blockcheck(\%setters,'com',$clientip);
       if ($by_ip) {
           my $showdom = &Apache::lonnet::domain($blockdom);
           if ($showdom eq '') {
               $showdom = $blockdom;
           }
           $r->print('<p class="LC_warning">'.
                     &mt('Sending of LON-CAPA messages is blocked for your current IP address: [_1].',$clientip).'</p>'.
                     '<ul><li>'.&mt('Note: communication is being blocked for certain IP address(es).').
                     '</li><li>'.
                     &mt('This restriction was set by an administrator in the [_1] LON-CAPA domain.',$showdom).
                     '</li></ul><br />');
       }
   
 # ------------------------------------------------------------------------ Menu  # ------------------------------------------------------------------------ Menu
     my ($can_srm,$can_dcm,$can_dff);      my ($can_srm,$can_dcm,$can_dff);
Line 66  sub menu { Line 82  sub menu {
                                            $env{'request.course.sec'}))) {                                             $env{'request.course.sec'}))) {
             $can_dff = 1;              $can_dff = 1;
         }          }
     }         }
   
  my @reports = (      my @reports;
     {categorytitle => 'Send Messages',      unless ($by_ip) {
          items => [          @reports = (
               {categorytitle => 'Send Messages',
                items => [
             {url => '/adm/email?compose=individual',              {url => '/adm/email?compose=individual',
  permission => 'F',   permission => 'F',
  icon => 'mail-reply-sender.png',   icon => 'mail-message-new.png',
              linktext => 'New Message',               linktext => 'New Message',
              linktitle => 'Send a message to users.'},               linktitle => 'Send a message to users.'},
                 
Line 89  sub menu { Line 107  sub menu {
              icon => 'fromfile.png',               icon => 'fromfile.png',
              linktext => 'New Messages from File',               linktext => 'New Messages from File',
  linktitle => 'Create a message from file and send to users.'},   linktitle => 'Create a message from file and send to users.'},
          ]},               ]},
  );          );
       }
   
  if ($can_dff || $can_dcm ){      if ($can_dff || $can_dcm ){
  push(@reports,{categorytitle => 'Message Administration',          push(@reports,{categorytitle => 'Message Administration',
          items => [               items => [
             {url => '/adm/email?recordftf=query',              {url => '/adm/email?recordftf=query',
  permission => "$can_dff",   permission => "$can_dff",
              icon => 'messalog.png',               icon => 'messalog.png',
Line 102  sub menu { Line 121  sub menu {
  help => 'Course_Face_To_Face_Records,Course_Critical_Message',   help => 'Course_Face_To_Face_Records,Course_Critical_Message',
              linktitle => "User notes, records of face-to-face discussions, critical messages, broadcast messages and archived messages in $crstype."},               linktitle => "User notes, records of face-to-face discussions, critical messages, broadcast messages and archived messages in $crstype."},
                                           
             {url => '/adm/email?block=display',              {url => '/adm/setblock?caller=email',
  permission => "$can_dcm",   permission => "$can_dcm",
              icon => 'comblock.png',               icon => 'comblock.png',
  linktext => 'Communication Blocking',   linktext => 'Communication Blocking',
              linktitle => "Blocking of $usertype communication during exams."},               linktitle => "Blocking of $usertype communication during exams."},
          ]});               ]});
         }      }
 $r->print(&Apache::lonhtmlcommon::generate_menu(@reports));      if (@reports) {
           $r->print(&Apache::lonhtmlcommon::generate_menu(@reports));
       }
       return;
 }  }
   
 sub handler {  sub handler {

Removed from v.1.44  
changed lines
  Added in v.1.48


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