version 1.47, 2012/04/18 19:56:59
|
version 1.48, 2022/01/18 17:33:13
|
Line 46 sub menu {
|
Line 46 sub menu {
|
$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-message-new.png', |
icon => 'mail-message-new.png', |
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 107 sub menu {
|
Line 126 sub menu {
|
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 { |