version 1.108, 2009/01/06 21:38:43
|
version 1.137, 2009/10/13 16:37:57
|
Line 113 use lib '/home/httpd/lib/perl/';
|
Line 113 use lib '/home/httpd/lib/perl/';
|
use LONCAPA; |
use LONCAPA; |
|
|
# Querystring component with sorting type |
# Querystring component with sorting type |
my $sqs; |
my $sqs=''; |
my $startdis; |
my $startdis=''; |
|
|
# ============================================================ List all folders |
# ============================================================ List all folders |
|
|
Line 136 sub folderlist {
|
Line 136 sub folderlist {
|
|
|
); |
); |
|
|
|
# set se lastvisit for the new mail check in the toplevel menu |
|
&Apache::lonnet::appenv({'user.mailcheck.lastvisit'=>time}); |
|
|
my %actions = &Apache::lonlocal::texthash( |
my %actions = &Apache::lonlocal::texthash( |
view => 'View Folder', |
view => 'View Folder', |
rename => 'Rename Folder', |
rename => 'Rename Folder', |
Line 170 sub folderlist {
|
Line 173 sub folderlist {
|
|
|
$formhash{'select_form_order'} = ['','critical',@userorder,'sent','trash']; |
$formhash{'select_form_order'} = ['','critical',@userorder,'sent','trash']; |
my $output = qq|<script type="text/javascript"> |
my $output = qq|<script type="text/javascript"> |
|
// <![CDATA[ |
function folder_choice(targetform,caller) { |
function folder_choice(targetform,caller) { |
var permfolders_keys = new Array('$permlistkeys'); |
var permfolders_keys = new Array('$permlistkeys'); |
var permfolders_vals = new Array('$permlistvals'); |
var permfolders_vals = new Array('$permlistvals'); |
Line 211 function folder_choice(targetform,caller
|
Line 215 function folder_choice(targetform,caller
|
} |
} |
} |
} |
} |
} |
|
// ]]> |
</script>|; |
</script>|; |
my %show = ('select_form_order' => [10,20,50,100,200], |
my %show = ('select_form_order' => [10,20,50,100,200], |
map {$_=>$_} (10,20,50,100,200)); |
map {$_=>$_} (10,20,50,100,200)); |
Line 236 function folder_choice(targetform,caller
|
Line 241 function folder_choice(targetform,caller
|
<td align="center"><b>'.$lt{'actn'}.'</b><br />'. |
<td align="center"><b>'.$lt{'actn'}.'</b><br />'. |
&Apache::loncommon::select_form('view','folderaction',%actions).' |
&Apache::loncommon::select_form('view','folderaction',%actions).' |
</td><td><br />'. |
</td><td><br />'. |
'<input type="button" value="'.$lt{'go'}.'" onClick="javascript:folder_choice(this.form,'."'change'".');" /> |
'<input type="button" value="'.$lt{'go'}.'" onclick="javascript:folder_choice(this.form,'."'change'".');" /> |
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
Line 244 function folder_choice(targetform,caller
|
Line 249 function folder_choice(targetform,caller
|
<td align="right"> |
<td align="right"> |
<table><tr><td><br /> |
<table><tr><td><br /> |
<input type="button" value="'.&mt('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('Name').'</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> |
Line 292 sub scrollbuttons {
|
Line 297 sub scrollbuttons {
|
} |
} |
return |
return |
'<b>'.&mt('Page').'</b>: '. |
'<b>'.&mt('Page').'</b>: '. |
'<input type="submit" name="firstview" value="'.&mt('First').'" />'. |
'<input type="submit" name="firstview" value="|<" />'. |
'<input type="submit" name="prevview" value="'.&mt('Previous').'" />'. |
'<input type="submit" name="prevview" value="<" />'. |
'<input type="text" size="5" name="startdis" value="'.$start.'" onChange="this.form.submit()" /> of '.$maxdis. |
' <input type="text" size="5" name="startdis" value="'.$start.'" onchange="this.form.submit()" /> / '.$maxdis.' '. |
'<input type="submit" name="nextview" value="'.&mt('Next').'" />'. |
'<input type="submit" name="nextview" value=">" />'. |
'<input type="submit" name="lastview" value="'.&mt('Last').'" /><br />'. |
'<input type="submit" name="lastview" value=">|" /><br />'. |
&mt('<b>[_1] messages</b>: showing messages [_2] through [_3] of [_4].',$status,$first,$finish,$total).'</form>'; |
&mt('<b>[_1] messages</b>: showing messages [_2] through [_3] of [_4].',$status,$first,$finish,$total).'</form>'; |
} |
} |
# =============================================================== Status Change |
# =============================================================== Status Change |
Line 519 sub discourse {
|
Line 524 sub discourse {
|
\%defaultUsers, |
\%defaultUsers, |
1,"selectedusers",1,'email') |
1,"selectedusers",1,'email') |
) { |
) { |
$result .= '<fieldset id="LC_activeusers"><legend><b>'.&mt('Bcc: course members with current access').'</b></legend><form name="activeusers">'; |
$result .= '<fieldset id="LC_activeusers"><legend>' |
|
.&mt('Bcc: course members with current access') |
|
.'</legend>' |
|
.'<form name="activeusers">'; |
$result .= $tmptext.'</form></fieldset><br />'; |
$result .= $tmptext.'</form></fieldset><br />'; |
if (ref($statushash) eq 'HASH') { |
if (ref($statushash) eq 'HASH') { |
$statushash->{'active'} = 1; |
$statushash->{'active'} = 1; |
Line 531 sub discourse {
|
Line 539 sub discourse {
|
\%defaultUsers, |
\%defaultUsers, |
1, "selectedusers",0,'email') |
1, "selectedusers",0,'email') |
) { |
) { |
$result .= '<fieldset id="LC_previoususers"><legend><b>'.&mt('Bcc: course members with expired access').'</b></legend><form name="previoususers">'; |
$result .= '<fieldset id="LC_previoususers"><legend>' |
|
.&mt('Bcc: course members with expired access') |
|
.'</legend>' |
|
.'<form name="previoususers">'; |
$result .= $tmptext.'</form></fieldset><br />'; |
$result .= $tmptext.'</form></fieldset><br />'; |
if (ref($statushash) eq 'HASH') { |
if (ref($statushash) eq 'HASH') { |
$statushash->{'previous'} = 1; |
$statushash->{'previous'} = 1; |
Line 544 sub discourse {
|
Line 555 sub discourse {
|
\%defaultUsers, |
\%defaultUsers, |
1, "selectedusers",0,'email') |
1, "selectedusers",0,'email') |
) { |
) { |
$result .= '<fieldset id="LC_futureusers"><legend><b>'.&mt('Bcc: course members with future access').'</b></legend><form name="previoususers">'; |
$result .= '<fieldset id="LC_futureusers"><legend>' |
|
.&mt('Bcc: course members with future access') |
|
.'</legend>' |
|
.'<form name="futureusers">'; |
$result .= $tmptext.'</form></fieldset>'; |
$result .= $tmptext.'</form></fieldset>'; |
if (ref($statushash) eq 'HASH') { |
if (ref($statushash) eq 'HASH') { |
$statushash->{'future'} = 1; |
$statushash->{'future'} = 1; |
Line 583 sub disgroup {
|
Line 597 sub disgroup {
|
return; |
return; |
} else { |
} else { |
$hasfloat = 1; |
$hasfloat = 1; |
$r->print('<div class="LC_left_float">'); |
unless($env{'environment.wysiwygeditor'} eq 'on') { |
|
$r->print('<div class="LC_left_float">'); |
|
} |
my %Sortby = ( |
my %Sortby = ( |
active => {}, |
active => {}, |
previous => {}, |
previous => {}, |
Line 617 sub disgroup {
|
Line 633 sub disgroup {
|
if (ref($access_status) eq 'HASH') { |
if (ref($access_status) eq 'HASH') { |
$access_status->{$status} = $$numitems{$status}; |
$access_status->{$status} = $$numitems{$status}; |
} |
} |
$r->print('<fieldset><legend><b>'.$lt{$status}. |
$r->print('<fieldset>'. |
'</b></legend><form name="'.$formname.'">'. |
'<legend>'.$lt{$status}.'</legend>'. |
|
'<form name="'.$formname.'">'. |
'<span class="LC_nobreak">'. |
'<span class="LC_nobreak">'. |
'<input type="button" value="'.&mt('Check All').'" '. |
'<input type="button" value="'.&mt('Check All').'" '. |
'onclick="javascript:toggleAll('."this.form,'check'".')" />'. |
'onclick="javascript:toggleAll('."this.form,'check'".')" />'. |
Line 651 sub disgroup {
|
Line 668 sub disgroup {
|
} |
} |
} |
} |
$r->print(&Apache::loncommon::end_data_table().'</form>'. |
$r->print(&Apache::loncommon::end_data_table().'</form>'. |
'</fieldset><br /></div>'); |
'</fieldset><br />'); |
} |
} |
} |
} |
} |
} |
|
unless($env{'environment.wysiwygeditor'} eq 'on') { |
|
$r->print('</div>'); |
|
} |
} |
} |
return $hasfloat; |
return $hasfloat; |
} |
} |
Line 662 sub disgroup {
|
Line 682 sub disgroup {
|
sub group_check_uncheck { |
sub group_check_uncheck { |
my $output = qq| |
my $output = qq| |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
function toggleAll(form,action) { |
function toggleAll(form,action) { |
if (typeof(form.selectedusers_forminput.length)=="undefined") { |
if (typeof(form.selectedusers_forminput.length)=="undefined") { |
if (action == 'check') { |
if (action == 'check') { |
Line 679 function toggleAll(form,action) {
|
Line 700 function toggleAll(form,action) {
|
} |
} |
} |
} |
} |
} |
|
// ]]> |
</script> |
</script> |
|; |
|; |
} |
} |
Line 754 sub discrit {
|
Line 776 sub discrit {
|
.'<div class="LC_warning">' |
.'<div class="LC_warning">' |
.&mt('Access to other pages will be prevented until you have moved all critical messages to your inbox.') |
.&mt('Access to other pages will be prevented until you have moved all critical messages to your inbox.') |
.'</div><br />' |
.'</div><br />' |
.'<form action="/adm/email" method="POST">' |
.'<form action="/adm/email" method="post">' |
.'<input type="hidden" name="confirm" value="true" />'; |
.'<input type="hidden" name="confirm" value="true" />'; |
my %what=&Apache::lonnet::dump('critical'); |
my %what=&Apache::lonnet::dump('critical'); |
my $result = ''; |
my $result = ''; |
Line 833 sub sortedmessages {
|
Line 855 sub sortedmessages {
|
} |
} |
|
|
foreach my $msgid (@messages) { |
foreach my $msgid (@messages) { |
|
next if ($msgid eq ''); |
my $esc_msgid=&escape($msgid); |
my $esc_msgid=&escape($msgid); |
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid,$processid,$symb,$error) = |
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid,$processid,$symb,$error) = |
&Apache::lonmsg::unpackmsgid($esc_msgid,$folder,undef, |
&Apache::lonmsg::unpackmsgid($esc_msgid,$folder,undef, |
Line 972 sub disfolder {
|
Line 995 sub disfolder {
|
my $jscript = &Apache::loncommon::check_uncheck_jscript(); |
my $jscript = &Apache::loncommon::check_uncheck_jscript(); |
$r->print(<<ENDDISHEADER); |
$r->print(<<ENDDISHEADER); |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
$jscript |
$jscript |
|
|
function validate_checkedaction() { |
function validate_checkedaction() { |
Line 1000 sub disfolder {
|
Line 1024 sub disfolder {
|
} |
} |
document.disall.submit(); |
document.disall.submit(); |
} |
} |
|
// ]]> |
</script> |
</script> |
ENDDISHEADER |
ENDDISHEADER |
|
|
my $fsqs='&folder='.$folder; |
my $fsqs='&folder='.$folder; |
my @temp=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus); |
my @temp=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus); |
my $totalnumber=$#temp+1; |
my $totalnumber=$#temp+1; |
if ($totalnumber < 1) { |
if ($totalnumber < 1) { |
Line 1036 ENDDISHEADER
|
Line 1060 ENDDISHEADER
|
$r->print('<form method="post" name="disall" action="/adm/email">'. |
$r->print('<form method="post" name="disall" action="/adm/email">'. |
'<table class="LC_mail_list"><tr><th colspan="1"> </th><th>'); |
'<table class="LC_mail_list"><tr><th colspan="1"> </th><th>'); |
if ($env{'form.sortedby'} eq "revdate") { |
if ($env{'form.sortedby'} eq "revdate") { |
$r->print('<a href = "?sortedby=date'.$fsqs.'">'.&mt('Date').'</a></th>'); |
$r->print('<a href = "/adm/email?sortedby=date'.$fsqs.'">'.&mt('Date').'</a></th>'); |
} else { |
} else { |
$r->print('<a href = "?sortedby=revdate'.$fsqs.'">'.&mt('Date').'</a></th>'); |
$r->print('<a href = "/adm/email?sortedby=revdate'.$fsqs.'">'.&mt('Date').'</a></th>'); |
} |
} |
$r->print('<th>'); |
$r->print('<th>'); |
if ($env{'form.sortedby'} eq "revuser") { |
if ($env{'form.sortedby'} eq "revuser") { |
$r->print('<a href = "?sortedby=user'.$fsqs.'">'.&mt('Username').'</a>'); |
$r->print('<a href = "/adm/email?sortedby=user'.$fsqs.'">'.&mt('Username').'</a>'); |
} else { |
} else { |
$r->print('<a href = "?sortedby=revuser'.$fsqs.'">'.&mt('Username').'</a>'); |
$r->print('<a href = "/adm/email?sortedby=revuser'.$fsqs.'">'.&mt('Username').'</a>'); |
} |
} |
$r->print('</th><th>'); |
$r->print('</th><th>'); |
if ($env{'form.sortedby'} eq "revdomain") { |
if ($env{'form.sortedby'} eq "revdomain") { |
$r->print('<a href = "?sortedby=domain'.$fsqs.'">'.&mt('Domain').'</a>'); |
$r->print('<a href = "/adm/email?sortedby=domain'.$fsqs.'">'.&mt('Domain').'</a>'); |
} else { |
} else { |
$r->print('<a href = "?sortedby=revdomain'.$fsqs.'">'.&mt('Domain').'</a>'); |
$r->print('<a href = "/adm/email?sortedby=revdomain'.$fsqs.'">'.&mt('Domain').'</a>'); |
} |
} |
$r->print('</th><th>'); |
$r->print('</th><th>'); |
if ($env{'form.sortedby'} eq "revsubject") { |
if ($env{'form.sortedby'} eq "revsubject") { |
$r->print('<a href = "?sortedby=subject'.$fsqs.'">'.&mt('Subject').'</a>'); |
$r->print('<a href = "/adm/email?sortedby=subject'.$fsqs.'">'.&mt('Subject').'</a>'); |
} else { |
} else { |
$r->print('<a href = "?sortedby=revsubject'.$fsqs.'">'.&mt('Subject').'</a>'); |
$r->print('<a href = "/adm/email?sortedby=revsubject'.$fsqs.'">'.&mt('Subject').'</a>'); |
} |
} |
$r->print('</th><th>'); |
$r->print('</th><th>'); |
if ($env{'form.sortedby'} eq "revcourse") { |
if ($env{'form.sortedby'} eq "revcourse") { |
$r->print('<a href = "?sortedby=course'.$fsqs.'">'.&mt('Course').'</a>'); |
$r->print('<a href = "/adm/email?sortedby=course'.$fsqs.'">'.&mt('Course').'</a>'); |
} else { |
} else { |
$r->print('<a href = "?sortedby=revcourse'.$fsqs.'">'.&mt('Course').'</a>'); |
$r->print('<a href = "/adm/email?sortedby=revcourse'.$fsqs.'">'.&mt('Course').'</a>'); |
} |
} |
$r->print('</th><th>'); |
$r->print('</th><th>'); |
if ($env{'form.sortedby'} eq "revstatus") { |
if ($env{'form.sortedby'} eq "revstatus") { |
$r->print('<a href = "?sortedby=status'.$fsqs.'">'.&mt('Status').'</a></th>'); |
$r->print('<a href = "/adm/email?sortedby=status'.$fsqs.'">'.&mt('Status').'</a></th>'); |
} else { |
} else { |
$r->print('<a href = "?sortedby=revstatus'.$fsqs.'">'.&mt('Status').'</a></th>'); |
$r->print('<a href = "/adm/email?sortedby=revstatus'.$fsqs.'">'.&mt('Status').'</a></th>'); |
} |
} |
$r->print("</tr>\n"); |
$r->print("</tr>\n"); |
|
|
my $suffix = &Apache::lonmsg::foldersuffix($folder); |
my $suffix = &Apache::lonmsg::foldersuffix($folder); |
|
my $count = $firstdis; |
for (my $n=$firstdis;$n<=$lastdis;$n++) { |
for (my $n=$firstdis;$n<=$lastdis;$n++) { |
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID, |
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID, |
$description,$recv_name,$recv_domain)= |
$description,$recv_name,$recv_domain)= |
@{$temp[$n]}; |
@{$temp[$n]}; |
if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) { |
if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) { |
|
$count ++; |
if ($status eq 'new') { |
if ($status eq 'new') { |
$r->print('<tr class="LC_mail_new">'); |
$r->print('<tr class="LC_mail_new">'); |
} elsif ($status eq 'read') { |
} elsif ($status eq 'read') { |
Line 1109 ENDDISHEADER
|
Line 1135 ENDDISHEADER
|
} |
} |
} |
} |
my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime); |
my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime); |
my $count = $n +1; |
|
$r->print('<td align="right"><span class="LC_nobreak">'.(($status eq 'new')?'<b>':''). |
$r->print('<td align="right"><span class="LC_nobreak">'.(($status eq 'new')?'<b>':''). |
$count.'.'.(($status eq 'new')?'</b>':'').' '. |
$count.'.'.(($status eq 'new')?'</b>':'').' '. |
'<input type="checkbox" name="delmark"'. |
'<input type="checkbox" name="delmark"'. |
Line 1117 ENDDISHEADER
|
Line 1142 ENDDISHEADER
|
foreach my $item ($localsenttime,$dis_name,$dis_domain,$shortsubj) { |
foreach my $item ($localsenttime,$dis_name,$dis_domain,$shortsubj) { |
$r->print('<td>'.(($status eq 'new')?'<b>':''). |
$r->print('<td>'.(($status eq 'new')?'<b>':''). |
'<a href="/adm/email?display='.$origID.$sqs.'">'. |
'<a href="/adm/email?display='.$origID.$sqs.'">'. |
$item.(($status eq 'new')?'</b>':'').'</td>'); |
$item.(($status eq 'new')?'</b>':'').'</a></td>'); |
} |
} |
my $showstatus; |
my $showstatus; |
my %statushash = &get_msgstatus_types(); |
my %statushash = &get_msgstatus_types(); |
Line 1180 ENDDISHEADER
|
Line 1205 ENDDISHEADER
|
'" onclick="javascript:validate_checkedaction()"/></td>'."\n". |
'" onclick="javascript:validate_checkedaction()"/></td>'."\n". |
'</tr></table>'); |
'</tr></table>'); |
my $postedstartdis=$startdis+1; |
my $postedstartdis=$startdis+1; |
$r->print('<input type="hidden" name="folder" value="'.$folder.'" /><input type="hidden" name="startdis" value="'.$postedstartdis.'" /><input type="hidden" name="interdis" value="'.$env{'form.interdis'}.'" /><input type="hidden" name="msgstatus" value="'.$msgstatus.'" ><input type="hidden" name="markedaction" value="" /></form>'); |
$r->print('<input type="hidden" name="folder" value="'.$folder.'" /><input type="hidden" name="startdis" value="'.$postedstartdis.'" /><input type="hidden" name="interdis" value="'.$env{'form.interdis'}.'" /><input type="hidden" name="msgstatus" value="'.$msgstatus.'" /><input type="hidden" name="markedaction" value="" /></form>'); |
if ($numblocked > 0) { |
if ($numblocked > 0) { |
$r->print(&blocked_in_folder($numblocked,$startblock,$endblock, |
$r->print(&blocked_in_folder($numblocked,$startblock,$endblock, |
\%setters)); |
\%setters)); |
Line 1193 sub blocked_in_folder {
|
Line 1218 sub blocked_in_folder {
|
my $finishblock = &Apache::lonlocal::locallocaltime($endblock); |
my $finishblock = &Apache::lonlocal::locallocaltime($endblock); |
my $output = '<br /><br />'. |
my $output = '<br /><br />'. |
&mt('[quant,_1,message is, messages are] not viewable because display of LON-CAPA messages sent to you by other students between [_2] and [_3] is currently being blocked because of online exams.',$numblocked,$beginblock,$finishblock); |
&mt('[quant,_1,message is, messages are] not viewable because display of LON-CAPA messages sent to you by other students between [_2] and [_3] is currently being blocked because of online exams.',$numblocked,$beginblock,$finishblock); |
$output .= &Apache::loncommon::build_block_table($startblock,$endblock, |
#$output .= &Apache::loncommon::build_block_table($startblock,$endblock, |
$setters); |
# $setters); |
|
|
|
my ($blocked, $blocktext) = &Apache::loncommon::blocking_status("com"); |
|
$output .="<br /><br />".$blocktext; |
|
|
return $output; |
return $output; |
} |
} |
|
|
Line 1239 sub compout {
|
Line 1268 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 [quant,_1,message] you checked' |
.' will be forwarded to the recipient(s) you select below.',$multiforward) |
.' will be forwarded to the recipient(s) you select below.' |
|
,'<b>'.$multiforward.'</b>') |
.'<br />'); |
.'<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 1319 sub compout {
|
Line 1349 sub compout {
|
if ($group eq '') { |
if ($group eq '') { |
my $studentsel = &discourse(\%access_status); |
my $studentsel = &discourse(\%access_status); |
if ($studentsel) { |
if ($studentsel) { |
$r->print('<div class="LC_left_float">'.$studentsel.'</div>'); |
if ($env{'environment.wysiwygeditor'} eq 'on') { |
|
$r->print($studentsel); |
|
} else { |
|
$r->print('<div class="LC_left_float">'.$studentsel.'</div>'); |
|
} |
$hasfloat = 1; |
$hasfloat = 1; |
} |
} |
} else { |
} else { |
Line 1332 sub compout {
|
Line 1366 sub compout {
|
$sendmode = '<input type="hidden" name="sendmode" value="group" />'."\n"; |
$sendmode = '<input type="hidden" name="sendmode" value="group" />'."\n"; |
$broadcast_js = qq| |
$broadcast_js = qq| |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
function courseRecipients() { |
function courseRecipients() { |
|; |
|; |
foreach my $type (keys(%access_status)) { |
foreach my $type (keys(%access_status)) { |
Line 1358 function courseRecipients() {
|
Line 1393 function courseRecipients() {
|
$broadcast_js .= qq| |
$broadcast_js .= qq| |
return; |
return; |
} |
} |
|
// ]]> |
</script> |
</script> |
|
|
|; |
|; |
Line 1401 function courseRecipients() {
|
Line 1437 function courseRecipients() {
|
my $jscript = &Apache::loncommon::check_uncheck_jscript(); |
my $jscript = &Apache::loncommon::check_uncheck_jscript(); |
$r->print(<<"ENDREPSCRIPT"); |
$r->print(<<"ENDREPSCRIPT"); |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
$jscript |
$jscript |
|
// ]]> |
</script> |
</script> |
ENDREPSCRIPT |
ENDREPSCRIPT |
} |
} |
Line 1411 ENDREPSCRIPT
|
Line 1449 ENDREPSCRIPT
|
if ($env{'form.text'}) { $dismsg=$env{'form.text'}; } |
if ($env{'form.text'}) { $dismsg=$env{'form.text'}; } |
if ($env{'form.subject'}) { $dissub=$env{'form.subject'}; } |
if ($env{'form.subject'}) { $dissub=$env{'form.subject'}; } |
if ($hasfloat) { |
if ($hasfloat) { |
$r->print($broadcast_js.'<div class="LC_left_float">'); |
if ($env{'environment.wysiwygeditor'} eq 'on') { |
|
$r->print($broadcast_js); |
|
} else { |
|
$r->print($broadcast_js.'<div class="LC_left_float">'); |
|
} |
$onsubmit = ' onsubmit="javascript:courseRecipients();" '; |
$onsubmit = ' onsubmit="javascript:courseRecipients();" '; |
} |
} |
$r->print( |
$r->print( |
Line 1520 ENDREPSCRIPT
|
Line 1562 ENDREPSCRIPT
|
$r->print(&recipient_input_row($defdom,%lt)); |
$r->print(&recipient_input_row($defdom,%lt)); |
} |
} |
} |
} |
my $latexHelp = &Apache::loncommon::helpLatexCheatsheet(); |
my $latexHelp = &Apache::loncommon::helpLatexCheatsheet(undef,undef,1); |
my $wysiwyglink=&Apache::lonhtmlcommon::htmlareaselectactive('message').'<br />'; |
my $wysiwyglink=&Apache::lonhtmlcommon::htmlareaselectactive('message').'<br />'; |
my $subj_size; |
my $subj_size; |
if ($multiforward) { |
if ($multiforward) { |
Line 1563 $wysiwyglink);
|
Line 1605 $wysiwyglink);
|
$r->print(<<"ENDCOMP"); |
$r->print(<<"ENDCOMP"); |
$attachrow |
$attachrow |
</table><br /> |
</table><br /> |
$latexHelp |
$latexHelp<br /> |
<textarea name="message" id="message" cols="80" rows="15" wrap="hard">$dismsg |
<textarea name="message" id="message" cols="80" rows="15" wrap="hard">$dismsg |
</textarea>$wysiwyglink |
</textarea>$wysiwyglink |
$sendmode |
$sendmode |
Line 1617 ENDUPLOAD
|
Line 1659 ENDUPLOAD
|
} |
} |
$r->print('</form>'); |
$r->print('</form>'); |
if ($hasfloat) { |
if ($hasfloat) { |
$r->print('</div><div class="LC_clear_float_footer"></div>'); |
unless($env{'environment.wysiwygeditor'} eq 'on') { |
|
$r->print('</div><div class="LC_clear_float_footer"></div>'); |
|
} |
} |
} |
$r->print(&generate_preview_form); |
$r->print(&generate_preview_form); |
} |
} |
Line 1664 sub additional_rec_row {
|
Line 1708 sub additional_rec_row {
|
my $bcc = &mt('Bcc:'); |
my $bcc = &mt('Bcc:'); |
my $exmpl = &mt('username:domain,username:domain,...'); |
my $exmpl = &mt('username:domain,username:domain,...'); |
my $output = <<"ENDADD"; |
my $output = <<"ENDADD"; |
<tr><td colspan="3"><fieldset id="LC_additionalrecips"><legend><b>$lt->{'ad'}</b> <tt>($exmpl)</tt>:</legend><table> |
<tr><td colspan="3"><fieldset id="LC_additionalrecips"><legend>$lt->{'ad'} <tt>($exmpl)</tt></legend><table> |
<tr><td> </td><td>$lt->{'to'}</td><td><input type="text" size="50" name="additionalrec_to" /></td></tr> |
<tr><td> </td><td>$lt->{'to'}</td><td><input type="text" size="50" name="additionalrec_to" /></td></tr> |
<tr><td> </td><td>$cc</td><td><input type="text" size="50" name="additionalrec_cc" /></td></tr> |
<tr><td> </td><td>$cc</td><td><input type="text" size="50" name="additionalrec_cc" /></td></tr> |
<tr><td> </td><td>$bcc</td><td><input type="text" size="50" name="additionalrec_bcc" /></td></tr></table></fieldset> |
<tr><td> </td><td>$bcc</td><td><input type="text" size="50" name="additionalrec_bcc" /></td></tr></table></fieldset></td></tr> |
ENDADD |
ENDADD |
return $output; |
return $output; |
} |
} |
Line 1742 sub retrieve_instructor_comments {
|
Line 1786 sub retrieve_instructor_comments {
|
} |
} |
|
|
sub disfacetoface { |
sub disfacetoface { |
my ($r,$user,$domain)=@_; |
my ($r,$user,$domain,$target)=@_; |
my $target=$env{'form.grade_target'}; |
if ($target eq '') { |
|
my $target=$env{'form.grade_target'}; |
|
} |
unless ($env{'request.course.id'}) { return; } |
unless ($env{'request.course.id'}) { return; } |
if (!&Apache::lonnet::allowed('dff',$env{'request.course.id'}) |
if (!&Apache::lonnet::allowed('dff',$env{'request.course.id'}) |
&& ! &Apache::lonnet::allowed('dff',$env{'request.course.id'}. |
&& ! &Apache::lonnet::allowed('dff',$env{'request.course.id'}. |
Line 1755 sub disfacetoface {
|
Line 1801 sub disfacetoface {
|
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.num'}, |
$env{'course.'.$env{'request.course.id'}.'.num'}, |
'%255b'.$user.'%253a'.$domain.'%255d'); |
'%255b'.$user.'%253a'.$domain.'%255d'); |
my $result=''; |
my $result='<div>'; |
foreach my $key (sort(keys(%records))) { |
foreach my $key (sort(keys(%records))) { |
my %content=&Apache::lonmsg::unpackagemsg($records{$key}); |
my %content=&Apache::lonmsg::unpackagemsg($records{$key}); |
next if ($content{'senderdomain'} eq ''); |
next if ($content{'senderdomain'} eq ''); |
Line 1819 $content{'sendername'}.':'.
|
Line 1865 $content{'sendername'}.':'.
|
} else { |
} else { |
$r->print('\textbf{'.&mt('No notes, face-to-face discussion records, critical messages or broadcast messages in this [_1].',$lctype).'}\\\\'); |
$r->print('\textbf{'.&mt('No notes, face-to-face discussion records, critical messages or broadcast messages in this [_1].',$lctype).'}\\\\'); |
} |
} |
|
} elsif ($target ne 'tex') { |
|
$r->print($result.'</div>'); |
} else { |
} else { |
$r->print($result); |
$r->print(&Apache::lonxml::xmlparse($r, 'tex', $result)); |
} |
} |
} |
} |
|
|
sub general_message { |
sub general_message { |
Line 1847 sub facetoface {
|
Line 1895 sub facetoface {
|
return; |
return; |
} |
} |
my $crstype = &Apache::loncommon::course_type(); |
my $crstype = &Apache::loncommon::course_type(); |
my $leaders = ($crstype eq 'Group') ? 'coordinators and leaders' |
my $leaders = ($crstype eq 'Community') ? 'coordinators and leaders' |
: 'faculty and staff'; |
: 'faculty and staff'; |
&printheader($r, |
&printheader($r, |
'/adm/email?recordftf=query', |
'/adm/email?recordftf=query', |
"User Notes, Face-to-Face, Critical Messages, Broadcast Messages, Archived Messages"); |
"User Notes, Face-to-Face, Critical Messages, Broadcast Messages, Archived Messages"); |
Line 1870 sub facetoface {
|
Line 1918 sub facetoface {
|
'subm' => 'Retrieve discussion and message records', |
'subm' => 'Retrieve discussion and message records', |
'newr' => 'New Record (record is visible to '.lc($crstype).' '.$leaders.')', |
'newr' => 'New Record (record is visible to '.lc($crstype).' '.$leaders.')', |
'post' => 'Post this Record'); |
'post' => 'Post this Record'); |
$r->print(<<"ENDTREC"); |
|
<h3>$lt{'head'}</h3> |
$r->print('<h2>'.$lt{'head'}.'</h2>' |
<form method="post" action="/adm/email" name="stdselect"> |
.'<form method="post" action="/adm/email" name="stdselect">' |
<input type="hidden" name="recordftf" value="retrieve" /> |
.'<input type="hidden" name="recordftf" value="retrieve" />' |
<table> |
.&Apache::lonhtmlcommon::start_pick_box() |
<tr><td>$lt{'user'}:</td><td><input type="text" size="12" name="recuname" value="$env{'form.recuname'}" /></td> |
.&Apache::lonhtmlcommon::row_title($lt{'user'}) |
<td rowspan="2"> |
.'<input type="text" size="12" name="recuname" value="'.$env{'form.recuname'}.'" />' |
$stdbrws |
.' '.$stdbrws |
<input type="submit" value="$lt{'subm'}" /></td> |
.&Apache::lonhtmlcommon::row_closure() |
</tr> |
.&Apache::lonhtmlcommon::row_title($lt{'dom'}) |
<tr><td>$lt{'dom'}:</td> |
.$domform |
<td>$domform</td></tr> |
.&Apache::lonhtmlcommon::row_closure(1) |
</table> |
.&Apache::lonhtmlcommon::end_pick_box() |
</form> |
.'<br />' |
ENDTREC |
.'<input type="submit" value="'.$lt{'subm'}.'" />' |
|
); |
|
|
if (($stage ne 'query') && |
if (($stage ne 'query') && |
($env{'form.recdomain'}) && ($env{'form.recuname'})) { |
($env{'form.recdomain'}) && ($env{'form.recuname'})) { |
chomp($env{'form.newrecord'}); |
chomp($env{'form.newrecord'}); |
Line 1893 ENDTREC
|
Line 1943 ENDTREC
|
$env{'form.recuname'}, |
$env{'form.recuname'}, |
$env{'form.recdomain'}); |
$env{'form.recdomain'}); |
} |
} |
$r->print('<h3>'.&Apache::loncommon::plainname($env{'form.recuname'}, |
my $aboutmelink=&Apache::loncommon::aboutmewrapper( |
$env{'form.recdomain'}).'</h3>'); |
&Apache::loncommon::plainname($env{'form.recuname'} |
|
,$env{'form.recdomain'}) |
|
,$env{'form.recuname'},$env{'form.recdomain'}); |
|
$r->print('<hr />' |
|
.'<h2>' |
|
.&mt('Discussion and message records for [_1] ([_2])' |
|
,$aboutmelink |
|
,$env{'form.recuname'}.':'.$env{'form.recdomain'}) |
|
.'<h2>' |
|
); |
&disfacetoface($r,$env{'form.recuname'},$env{'form.recdomain'}); |
&disfacetoface($r,$env{'form.recuname'},$env{'form.recdomain'}); |
$r->print(<<ENDRHEAD); |
$r->print(<<ENDRHEAD); |
<form method="post" action="/adm/email"> |
<form method="post" action="/adm/email"> |
Line 1923 sub examblock {
|
Line 1982 sub examblock {
|
$r->print('Not allowed'); |
$r->print('Not allowed'); |
return; |
return; |
} |
} |
my $usertype = (&Apache::loncommon::course_type() eq 'Group') ? 'members' |
my $usertype = (&Apache::loncommon::course_type() eq 'Community') ? 'members' |
: 'students'; |
: 'students'; |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'comb' => 'Communication Blocking', |
'comb' => 'Communication Blocking', |
'cbds' => 'Communication blocking during scheduled exams', |
'cbds' => 'Communication blocking during scheduled exams', |
Line 2133 END
|
Line 2192 END
|
foreach my $block (@{$typeorder}) { |
foreach my $block (@{$typeorder}) { |
my $blockstatus = ''; |
my $blockstatus = ''; |
if ($blocks->{$block} eq 'on') { |
if ($blocks->{$block} eq 'on') { |
$blockstatus = 'checked="true"'; |
$blockstatus = 'checked="checked"'; |
} |
} |
$r->print('<label><input type="checkbox" name="'.$block.'_'.$parmcount.'" '.$blockstatus.' value="1" />'.$types->{$block}.'</label><br />'); |
$r->print('<label><input type="checkbox" name="'.$block.'_'.$parmcount.'" '.$blockstatus.' value="1" />'.$types->{$block}.'</label><br />'); |
} |
} |
Line 2200 END
|
Line 2259 END
|
sub blocktype_text { |
sub blocktype_text { |
my %types = &Apache::lonlocal::texthash( |
my %types = &Apache::lonlocal::texthash( |
'com' => 'Messaging', |
'com' => 'Messaging', |
'chat' => 'Chat', |
'chat' => 'Chat Room', |
'boards' => 'Discussion', |
'boards' => 'Discussion', |
'port' => 'Portfolio', |
'port' => 'Portfolio', |
'groups' => 'Groups', |
'groups' => 'Groups', |
Line 2225 sub displaymessage {
|
Line 2284 sub displaymessage {
|
my @messages=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus); |
my @messages=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus); |
if ( $blocked{$msgid} eq 'ON' ) { |
if ( $blocked{$msgid} eq 'ON' ) { |
&printheader($r,'/adm/email',&mt('Display a Message')); |
&printheader($r,'/adm/email',&mt('Display a Message')); |
$r->print(&mt('You attempted to display a message that is currently blocked because you are enrolled in one or more courses for which there is an ongoing online exam.')); |
#$r->print(&mt('You attempted to display a message that is currently blocked because you are enrolled in one or more courses for which there is an ongoing online exam.')); |
&build_block_table($r,$startblock,$endblock,\%setters); |
#&build_block_table($r,$startblock,$endblock,\%setters); |
|
my($blocked, $blocktext) = &Apache::loncommon::blocking_status("com"); |
|
$r->print("<br />".$blocktext); |
return; |
return; |
} |
} |
if ($msgstatus eq '') { |
if ($msgstatus eq '') { |
Line 2263 sub displaymessage {
|
Line 2324 sub displaymessage {
|
&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 and Actions |
|
my $li_start='<span class="LC_nobreak">• '; |
|
my $li_end='</span> '; |
|
|
|
# Prepare available functions |
# Prepare available functions |
my $functionlist=''; |
my @functionlist; |
if (!$content{'noreplies'}) { |
if (!$content{'noreplies'}) { |
$functionlist.=$li_start |
push(@functionlist,'<a href="/adm/email?replyto='.&escape($msgid).$sqs.'">' |
.'<a href="/adm/email?replyto='.&escape($msgid).$sqs.'">' |
|
.&mt('Reply') |
.&mt('Reply') |
.'</a>' |
.'</a>'); |
.$li_end; |
|
} |
} |
$functionlist.=$li_start |
push(@functionlist,'<a href="/adm/email?forward='.&escape($msgid).$sqs.'">' |
.'<a href="/adm/email?forward='.&escape($msgid).$sqs.'">' |
|
.&mt('Forward') |
.&mt('Forward') |
.'</a>' |
.'</a>'); |
.$li_end; |
push(@functionlist,'<a href="/adm/email?markunread='.&escape($msgid).$sqs.'">' |
$functionlist.=$li_start |
|
.'<a href="/adm/email?markunread='.&escape($msgid).$sqs.'">' |
|
.&mt('Mark Unread') |
.&mt('Mark Unread') |
.'</a>' |
.'</a>'); |
.$li_end; |
push(@functionlist,'<a href="/adm/email?markdel='.&escape($msgid).$sqs.'">' |
$functionlist.=$li_start |
|
.'<a href="/adm/email?markdel='.&escape($msgid).$sqs.'">' |
|
.&mt('Delete') |
.&mt('Delete') |
.'</a>' |
.'</a>'); |
.$li_end; |
push(@functionlist,'<a href="/adm/email?'.$sqs.'">' |
$functionlist.=$li_start |
|
.'<a href="/adm/email?'.$sqs.'">' |
|
.&mt('Back to Folder Display') |
.&mt('Back to Folder Display') |
.'</a>' |
.'</a>'); |
.$li_end; |
|
if ($counter > 0){ |
if ($counter > 0){ |
$functionlist.=$li_start |
push(@functionlist,'<a href="/adm/email?display='.$messages[$counter-1]->[5].$sqs.'">' |
.'<a href="/adm/email?display='.$messages[$counter-1]->[5].$sqs.'">' |
.&mt('Previous') |
.&mt('Previous') |
.'</a>'); |
.'</a>' |
|
.$li_end; |
|
} |
} |
if ($counter < $number_of_messages - 1){ |
if ($counter < $number_of_messages - 1){ |
$functionlist.=$li_start |
push(@functionlist,'<a href="/adm/email?display='.$messages[$counter+1]->[5].$sqs.'">' |
.'<a href="/adm/email?display='.$messages[$counter+1]->[5].$sqs.'">' |
.&mt('Next') |
.&mt('Next') |
.'</a>'); |
.'</a>' |
} |
.$li_end; |
|
} |
|
# Print functions |
|
$r->print('<div class="LC_left_float">' |
|
.'<fieldset>' |
|
.'<legend><span class="LC_mail_functions">' |
|
.&mt('Functions') |
|
.'</span></legend>' |
|
.$functionlist |
|
.'</fieldset>' |
|
.'</div>' |
|
); |
|
|
|
# Prepare available actions |
# Prepare available actions |
my $symb; |
my $symb; |
Line 2328 sub displaymessage {
|
Line 2361 sub displaymessage {
|
} elsif (defined($content{'baseurl'})) { |
} elsif (defined($content{'baseurl'})) { |
$symb=&Apache::lonnet::symbread($content{'baseurl'}); |
$symb=&Apache::lonnet::symbread($content{'baseurl'}); |
} |
} |
|
my @actionlist; |
if ($env{'user.adv'}) { |
if ($env{'user.adv'}) { |
my $actionlist=''; |
|
|
|
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { |
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { |
$actionlist.=$li_start |
push(@actionlist,&Apache::loncommon::track_student_link( |
.&Apache::loncommon::track_student_link( |
&mt('View recent activity') |
&mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check') |
,$content{'sendername'} |
.$li_end; |
,$content{'senderdomain'} |
|
,'check')); |
} |
} |
if (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) { |
if (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) { |
$actionlist.=$li_start |
push(@actionlist,&Apache::loncommon::pprmlink( |
.&Apache::loncommon::pprmlink( |
&mt('Set/Change parameters') |
&mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check') |
,$content{'sendername'} |
.$li_end; |
,$content{'senderdomain'} |
|
,$symb |
|
,'check')); |
} |
} |
if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) { |
if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) { |
$actionlist.=$li_start |
push(@actionlist,&Apache::loncommon::pgrdlink( |
.&Apache::loncommon::pgrdlink( |
&mt('Set/Change grades') |
&mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check') |
,$content{'sendername'} |
.$li_end; |
,$content{'senderdomain'} |
} |
,$symb |
|
,'check')); |
# Print actions |
} |
if ($actionlist) { |
|
$r->print('<div class="LC_left_float">' |
|
.'<fieldset>' |
|
.'<legend>' |
|
.&mt('[_1]Currently available actions[_2] (will open extra window):','<span class="LC_mail_functions">','</span>') |
|
.'</legend>' |
|
.$actionlist |
|
.'</fieldset>' |
|
.'</div>' |
|
); |
|
} |
|
} |
} |
|
|
|
# Print functionlist and actionlist in page header |
|
my $functions='<div class="LC_columnSection">'; |
|
|
|
# Functionlist |
|
$functions.=&Apache::lonhtmlcommon::start_funclist(); |
|
foreach my $item (@functionlist) { |
|
$functions.=&Apache::lonhtmlcommon::add_item_funclist($item); |
|
} |
|
$functions .= &Apache::lonhtmlcommon::end_funclist(); |
|
|
|
# Actionlist |
|
if (@actionlist) { |
|
my $legendtext=&mt('Currently available actions (will open extra window)'); |
|
$functions.=&Apache::lonhtmlcommon::start_funclist($legendtext); |
|
foreach my $item (@actionlist) { |
|
$functions.=&Apache::lonhtmlcommon::add_item_funclist($item); |
|
} |
|
$functions.=&Apache::lonhtmlcommon::end_funclist(); |
|
} |
|
|
|
$functions.='</div>'; |
|
$r->print(&Apache::loncommon::head_subbox($functions)); |
|
|
|
|
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); |
Line 2709 sub recipients_link {
|
Line 2758 sub recipients_link {
|
$body =~ s{\n}{}g; |
$body =~ s{\n}{}g; |
$r->print(<<ENDJS); |
$r->print(<<ENDJS); |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
function showBroadcastList() { |
function showBroadcastList() { |
var caller = this; |
var caller = this; |
var newWindow = null; |
var newWindow = null; |
Line 2731 function writeWin(caller) {
|
Line 2781 function writeWin(caller) {
|
caller.document.close(); |
caller.document.close(); |
caller.focus(); |
caller.focus(); |
} |
} |
|
// ]]> |
</script> |
</script> |
|
|
ENDJS |
ENDJS |
Line 2785 sub displayresource {
|
Line 2835 sub displayresource {
|
|
|
sub header { |
sub header { |
my ($r,$title,$baseurl)=@_; |
my ($r,$title,$baseurl)=@_; |
|
|
my $extra = &Apache::loncommon::studentbrowser_javascript(); |
my $extra = &Apache::loncommon::studentbrowser_javascript(); |
if ($baseurl) { |
if ($baseurl) { |
$extra .= "<base href=\"".&Apache::lonnet::absolute_url()."/$baseurl\" />"; |
$extra .= "<base href=\"".&Apache::lonnet::absolute_url()."/$baseurl\" />"; |
} |
} |
$r->print(&Apache::loncommon::start_page('Communication and Messages', |
$r->print(&Apache::loncommon::start_page('Communication', |
$extra)); |
$extra)); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(($title?$title:'Communication and Messages'))); |
(($title?$title:'Send and Receive Messages'))); |
} |
} |
|
|
# ---------------------------------------------------------------- Print header |
# ---------------------------------------------------------------- Print header |
Line 3164 sub sendoffmail {
|
Line 3213 sub sendoffmail {
|
&Apache::loncommunicate::menu($r); |
&Apache::loncommunicate::menu($r); |
} |
} |
} else { |
} else { |
$r->print('<p><span class="LC_error">'.&mt('Could not deliver message').'</span> '. |
$r->print('<p>'.&Apache::lonhtmlcommon::confirm_success(&mt('Could not deliver message'),1).'<br /> '. |
&mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus).'</p>'); |
&mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus).'</p>'); |
} |
} |
} |
} |
Line 3191 sub handler {
|
Line 3240 sub handler {
|
'recordftf','sortedby','block','folder','startdis','interdis', |
'recordftf','sortedby','block','folder','startdis','interdis', |
'showcommentbaseurl','dismode','group','subject','text','ref', |
'showcommentbaseurl','dismode','group','subject','text','ref', |
'msgstatus']); |
'msgstatus']); |
$sqs='&sortedby='.$env{'form.sortedby'}; |
$sqs='&sortedby='.$env{'form.sortedby'}; |
|
|
# ------------------------------------------------------ They checked for email |
# ------------------------------------------------------ They checked for email |
unless ($env{'form.block'}) { |
unless ($env{'form.block'}) { |
Line 3212 sub handler {
|
Line 3261 sub handler {
|
unless ($folder) { |
unless ($folder) { |
$folder=''; |
$folder=''; |
} else { |
} else { |
$sqs.='&folder='.&escape($folder); |
$sqs.='&folder='.&escape($folder); |
} |
} |
# ------------------------------------------------------------ Get Display Mode |
# ------------------------------------------------------------ Get Display Mode |
|
|
Line 3244 sub handler {
|
Line 3293 sub handler {
|
$startdis++; |
$startdis++; |
} |
} |
my $postedstartdis=$startdis+1; |
my $postedstartdis=$startdis+1; |
$sqs.='&startdis='.$postedstartdis; |
$sqs.='&startdis='.$postedstartdis; |
|
|
# --------------------------------------------------------------- Render Output |
# --------------------------------------------------------------- Render Output |
|
|
Line 3308 sub handler {
|
Line 3357 sub handler {
|
$total ++; |
$total ++; |
} |
} |
&printheader($r,'','Marked Messages Read'); |
&printheader($r,'','Marked Messages Read'); |
$r->print(&mt('Marked [_1] message(s) read',$total).'<p>'); |
$r->print(&mt('Marked [quant,_1,message] read',$total).'<p>'); |
&Apache::loncommunicate::menu($r); |
&Apache::loncommunicate::menu($r); |
&disall($r,($folder?$folder:$dismode),$msgstatus); |
&disall($r,($folder?$folder:$dismode),$msgstatus); |
} elsif ($env{'form.markedaction'} eq 'markedunread') { |
} elsif ($env{'form.markedaction'} eq 'markedunread') { |
Line 3319 sub handler {
|
Line 3368 sub handler {
|
$total ++; |
$total ++; |
} |
} |
&printheader($r,'','Marked Messages Unread'); |
&printheader($r,'','Marked Messages Unread'); |
$r->print(&mt('Marked [_1] message(s) unread',$total).'<p>'); |
$r->print(&mt('Marked [quant,_1,message] unread',$total).'<p>'); |
&Apache::loncommunicate::menu($r); |
&Apache::loncommunicate::menu($r); |
&disall($r,($folder?$folder:$dismode),$msgstatus); |
&disall($r,($folder?$folder:$dismode),$msgstatus); |
} elsif ($env{'form.markedaction'} eq 'markedmove') { |
} elsif ($env{'form.markedaction'} eq 'markedmove') { |
Line 3343 sub handler {
|
Line 3392 sub handler {
|
} |
} |
} |
} |
if ($failed) { |
if ($failed) { |
$r->print('<p class="LC_error"> |
$r->print('<p class="LC_error">' |
'.&mt('Failed to move [_1] message(s)',$failed). |
.&mt('Failed to move [quant,_1,message]',$failed) |
'</p>'); |
.'</p>'); |
$r->print('<p class="LC_error">'. |
$r->print('<p class="LC_error">'. |
join("</p>\n<p class=\"LC_error\">",@failed_msg). |
join("</p>\n<p class=\"LC_error\">",@failed_msg). |
"</p>\n"); |
"</p>\n"); |
} |
} |
$r->print(&mt('Moved [_1] message(s)',$total).'<p>'); |
$r->print('<p class="LC_success">' |
|
.&mt('Moved [quant,_1,message]',$total) |
|
.'</p>' |
|
.'<p>'); |
} |
} |
&Apache::loncommunicate::menu($r); |
&Apache::loncommunicate::menu($r); |
&disall($r,($folder?$folder:$dismode),$msgstatus); |
&disall($r,($folder?$folder:$dismode),$msgstatus); |
Line 3369 sub handler {
|
Line 3421 sub handler {
|
} |
} |
&printheader($r,'','Deleted Messages'); |
&printheader($r,'','Deleted Messages'); |
if ($failed) { |
if ($failed) { |
$r->print('<p class="LC_error"> |
$r->print('<p class="LC_error">' |
'.&mt('Failed to delete [_1] message(s)',$failed). |
.&mt('Failed to delete [quant,_1,message]',$failed) |
'</p>'); |
.'</p>'); |
$r->print('<p class="LC_error">'. |
$r->print('<p class="LC_error">'. |
join("</p>\n<p class=\"LC_error\">",@failed_msg). |
join("</p>\n<p class=\"LC_error\">",@failed_msg). |
"</p>\n"); |
"</p>\n"); |
} |
} |
$r->print(&mt('Deleted [_1] message(s)',$total).'<p>'); |
$r->print('<p class="LC_success">' |
|
.&mt('Deleted [quant,_1,message]',$total) |
|
.'</p>' |
|
.'<p>'); |
&Apache::loncommunicate::menu($r); |
&Apache::loncommunicate::menu($r); |
&disall($r,($folder?$folder:$dismode),$msgstatus); |
&disall($r,($folder?$folder:$dismode),$msgstatus); |
} elsif ($env{'form.markunread'}) { |
} elsif ($env{'form.markunread'}) { |
Line 3468 sub handler {
|
Line 3523 sub handler {
|
my $showfolder = $env{'form.newfolder'}; |
my $showfolder = $env{'form.newfolder'}; |
my ($makeresult,$warning) = &makefolder($env{'form.newfolder'}); |
my ($makeresult,$warning) = &makefolder($env{'form.newfolder'}); |
if ($makeresult eq 'ok') { |
if ($makeresult eq 'ok') { |
$r->print(&mt('Mail folder "[_1]" created.',$showfolder).'<br />'); |
$r->print('<p class="LC_success">' |
|
.&mt('Folder "[_1]" created.',$showfolder) |
|
.'</p>'); |
} else { |
} else { |
$r->print(&mt('Creation failed.').' '.$makeresult.'<br />'. |
$r->print('<p class="LC_warning">' |
$warning); |
.&mt('Creation failed.').' '.$makeresult.'<br />' |
|
.$warning |
|
.'</p>'); |
$showfolder = $folder; |
$showfolder = $folder; |
} |
} |
&Apache::loncommunicate::menu($r); |
&Apache::loncommunicate::menu($r); |
Line 3483 sub handler {
|
Line 3542 sub handler {
|
my $showfolder = ''; |
my $showfolder = ''; |
my $delresult = &deletefolder($folder); |
my $delresult = &deletefolder($folder); |
if ($delresult eq 'ok') { |
if ($delresult eq 'ok') { |
$r->print(&mt('Mail folder "[_1]" deleted.',$folder).'<br />'); |
$r->print('<p class="LC_success">' |
|
.&mt('Folder "[_1]" deleted.',$folder) |
|
.'</p>'); |
$env{'form.folder'} = ''; |
$env{'form.folder'} = ''; |
} else { |
} else { |
$r->print(&mt('Deletion failed.').' '.$delresult.'<br />'); |
$r->print('<p class="LC_warning">' |
|
.&mt('Deletion failed.').' '.$delresult |
|
.'</p>'); |
$showfolder = $folder; |
$showfolder = $folder; |
} |
} |
&Apache::loncommunicate::menu($r); |
&Apache::loncommunicate::menu($r); |
Line 3496 sub handler {
|
Line 3559 sub handler {
|
my $showfolder = $env{'form.renamed'}; |
my $showfolder = $env{'form.renamed'}; |
my $renresult = &renamefolder($folder); |
my $renresult = &renamefolder($folder); |
if ($renresult eq 'ok') { |
if ($renresult eq 'ok') { |
$r->print(&mt('Mail folder "[_1]" renamed "[_2]".',$folder,$showfolder).'<br />'); |
$r->print('<p class="LC_success">' |
|
.&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder) |
|
.'</p>'); |
} else { |
} else { |
$r->print(&mt('Renaming failed.').' '.$renresult.'<br />'); |
$r->print('<p class="LC_warning">' |
|
.&mt('Renaming failed.').' '.$renresult |
|
.'</p>'); |
$showfolder = $folder; |
$showfolder = $folder; |
} |
} |
&Apache::loncommunicate::menu($r); |
&Apache::loncommunicate::menu($r); |