version 1.41, 2007/01/31 16:02:49
|
version 1.44, 2008/12/10 14:36:36
|
Line 38 use Apache::lonnet;
|
Line 38 use Apache::lonnet;
|
|
|
sub menu { |
sub menu { |
my $r=shift; |
my $r=shift; |
my $crstype = 'Course'; |
my $crstype = 'course'; |
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 'Group') { |
$usertype = 'Member'; |
$usertype = 'member'; |
} |
} |
} |
} |
my %lt=&Apache::lonlocal::texthash( |
|
'vcm' => 'View Critical Messages', |
|
'smu' => 'Send Message to User(s)', |
|
'bmc' => "Broadcast Message to $crstype", |
|
'dmu' => "Distribute Messages from Uploaded File to $crstype", |
|
'unr' => |
|
'User Notes, Records of Face-to-Face Discussions, and Critical Messages', |
|
|
|
'cbs' => "Configure Blocking of $usertype Communication during Exams", |
|
); |
|
my %help=(); |
|
foreach ('Course_Face_To_Face_Records,Course_Critical_Message', |
|
'Course_Broadcast_Message') { |
|
$help{$_}=&Apache::loncommon::help_open_topic($_); |
|
} |
|
# ------------------------------------------------------------------------ Menu |
# ------------------------------------------------------------------------ Menu |
my ($can_srm,$can_dcm,$can_dff); |
my ($can_srm,$can_dcm,$can_dff); |
if ($env{'request.course.id'}) { |
if ($env{'request.course.id'}) { |
Line 80 sub menu {
|
Line 67 sub menu {
|
$can_dff = 1; |
$can_dff = 1; |
} |
} |
} |
} |
$r->print(<<END); |
|
<table cellspacing="10" cellpadding="2"> |
my @reports = ( |
<tr> |
{categorytitle => 'Send Messages', |
<td bgcolor="#FFFFAA"> |
items => [ |
<b><a href="/adm/email?compose=individual">$lt{'smu'}</a></b> |
{url => '/adm/email?compose=individual', |
</td> |
permission => 'F', |
<td></td> |
icon => 'mail-reply-sender.png', |
</tr> |
linktext => 'New Message', |
END |
linktitle => 'Send a message to users.'}, |
if ($can_srm) { |
|
$r->print(<<END); |
{url => '/adm/email?compose=group', |
<tr> |
permission => "$can_srm", |
<td bgcolor="#FFFFAA"> |
icon => 'mail-reply-all.png', |
<b><a href="/adm/email?compose=group">$lt{'bmc'}</a></b>$help{'Course_Broadcast_Message'} |
linktext => 'New Broadcast Message', |
</td> |
help => 'Course_Broadcast_Message', |
<td bgcolor="#FFFFAA"> |
linktitle => "Send a broadcast message to members of this $crstype and/or other users."}, |
<b><a href="/adm/email?compose=upload">$lt{'dmu'}</a></b> |
|
</td></tr> |
{url => '/adm/email?compose=upload', |
END |
permission => "$can_srm", |
} |
icon => 'fromfile.png', |
if ($can_dcm || $can_dff) { |
linktext => 'New Messages from File', |
$r->print('<tr>'); |
linktitle => 'Create a message from file and send to users.'}, |
} |
]}, |
if ($can_dff) { |
); |
$r->print(<<END); |
|
<td bgcolor="#FFFFAA"> |
if ($can_dff || $can_dcm ){ |
<b><a href="/adm/email?recordftf=query">$lt{'unr'}</a></b>$help{'Course_Face_To_Face_Records,Course_Critical_Message'} |
push(@reports,{categorytitle => 'Message Administration', |
</td> |
items => [ |
END |
{url => '/adm/email?recordftf=query', |
} |
permission => "$can_dff", |
if ($can_dcm) { |
icon => 'messalog.png', |
$r->print(' |
linktext => 'Message Log for Selected Users', |
<td bgcolor="#FFFFAA"> |
help => 'Course_Face_To_Face_Records,Course_Critical_Message', |
<b><a href="/adm/email?block=display">'.$lt{'cbs'}.'</a></b> |
linktitle => "User notes, records of face-to-face discussions, critical messages, broadcast messages and archived messages in $crstype."}, |
</td>'); |
|
} |
{url => '/adm/email?block=display', |
if ($can_dff || $can_dcm) { |
permission => "$can_dcm", |
$r->print('</tr>'); |
icon => 'comblock.png', |
} |
linktext => 'Communication Blocking', |
$r->print('</table>'); |
linktitle => "Blocking of $usertype communication during exams."}, |
|
]}); |
|
} |
|
$r->print(&Apache::lonhtmlcommon::generate_menu(@reports)); |
|
|
} |
} |
|
|
sub handler { |
sub handler { |