version 1.195, 2021/11/30 16:16:14
|
version 1.203, 2025/03/03 21:42:46
|
Line 111 use Apache::loncommunicate;
|
Line 111 use Apache::loncommunicate;
|
use Apache::lonfeedback; |
use Apache::lonfeedback; |
use Apache::lonrss(); |
use Apache::lonrss(); |
use Apache::lonselstudent(); |
use Apache::lonselstudent(); |
|
use Apache::lonenc(); |
use lib '/home/httpd/lib/perl/'; |
use lib '/home/httpd/lib/perl/'; |
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
|
|
Line 228 function folder_choice(targetform,caller
|
Line 229 function folder_choice(targetform,caller
|
<form method="post" action="/adm/email" name="folderlist"> |
<form method="post" action="/adm/email" name="folderlist"> |
<div class="LC_columnSection"><fieldset> |
<div class="LC_columnSection"><fieldset> |
<legend>'.&mt('Folder Actions').'</legend> |
<legend>'.&mt('Folder Actions').'</legend> |
<table border="0" cellspacing="2" cellpadding="8"> |
<div class="LC_columnSection"> |
<tr> |
<div class="LC_mail_actions"><label><b>'.$html_lt{'fold'}.'</b><br />'."\n". |
<td><b>'.$html_lt{'fold'}.'</b><br />'."\n". |
&Apache::loncommon::select_form($folder,'folder',\%formhash).'</label> |
&Apache::loncommon::select_form($folder,'folder',\%formhash).' |
</div> |
</td> |
<div class="LC_mail_actions"><label><b>'.$html_lt{'show'}.'</b><br />'."\n". |
<td><b>'.$html_lt{'show'}.'</b><br />'."\n". |
|
&Apache::loncommon::select_form($env{'form.interdis'},'interdis', |
&Apache::loncommon::select_form($env{'form.interdis'},'interdis', |
\%show).' |
\%show).'</label> |
</td> |
</div> |
<td><b>'.$html_lt{'status'}.'</b><br />'."\n". |
<div class="LC_mail_actions"><label><b>'.$html_lt{'status'}.'</b><br />'."\n". |
&Apache::loncommon::select_form($msgstatus,'msgstatus',\%statushash).' |
&Apache::loncommon::select_form($msgstatus,'msgstatus',\%statushash).'</label> |
</td> |
</div> |
<td style="padding-right: 40px;"> |
<div class="LC_mail_actions" style="padding-right: 1em"> |
<b>'.$html_lt{'actn'}.'</b><br />'."\n".' |
<label><b>'.$html_lt{'actn'}.'</b><br />'."\n".' |
<span class="LC_nobreak">'. |
<span class="LC_nobreak">'. |
&Apache::loncommon::select_form('view','folderaction',\%actions). |
&Apache::loncommon::select_form('view','folderaction',\%actions).'</label>'. |
' <input type="button" value="'.$html_lt{'go'}. |
' <input type="button" value="'.$html_lt{'go'}. |
'" onclick="javascript:folder_choice(this.form,'."'change'".');" /> |
'" onclick="javascript:folder_choice(this.form,'."'change'".');" /> |
</span> |
</span> |
</td> |
</div> |
<td style="border-left: 1px solid;padding-left: 40px;"> |
<div class="LC_vertical_line" style="padding: 0; height: 4em; margin: 0"> |
<b>'.&mt('New Folder').'</b><br />'."\n".' |
</div> |
|
<div class="LC_mail_actions" style="padding-left: 3em"> |
<span class="LC_nobreak"> |
<span class="LC_nobreak"> |
<input type="text" size="15" name="newfolder" value="" /> |
<label><b>'.&mt('New Folder').'</b><br />'."\n".' |
|
<input type="text" size="15" name="newfolder" value="" /></label> |
<input type="button" value="'.$html_lt{'go'}. |
<input type="button" value="'.$html_lt{'go'}. |
'" onclick="javascript:folder_choice(this.form,'."'new'".');" /> |
'" onclick="javascript:folder_choice(this.form,'."'new'".');" /> |
</span> |
</span> |
</td> |
</div> |
</tr> |
|
</table> |
|
</fieldset></div> |
</fieldset></div> |
'."\n". |
'."\n". |
'<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" />'. |
'<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" />'. |
'<input type="hidden" name="renamed" value="" />'. |
'<input type="hidden" name="renamed" value="" />'; |
($folder=~/^critical/?'</form>':''); |
|
return $output; |
return $output; |
} |
} |
|
|
Line 300 sub scrollbuttons {
|
Line 299 sub scrollbuttons {
|
} else { |
} else { |
$status = $statushash{$msgstatus}; |
$status = $statushash{$msgstatus}; |
} |
} |
my $output = '<b>'.&mt('Page:').'</b> '; |
my $output; |
if ($maxdis == 1) { |
if ($maxdis == 1) { |
# No buttons if only one page is displayed |
# No buttons if only one page is displayed |
$output .= '1/1'; |
$output = '<b>'.&mt('Page:').'</b> 1/1'; |
} else { |
} else { |
$output .= |
$output = '<b><label for="startdis">'.&mt('Page:').'</label></b> '. |
'<input type="submit" name="firstview" value="|<" />'. |
'<input type="submit" name="firstview" value="|<" />'. |
'<input type="submit" name="prevview" value="<" />'. |
'<input type="submit" name="prevview" value="<" />'. |
' <input type="text" size="5" name="startdis" value="'.$start.'" onchange="this.form.submit()" /> / '.$maxdis.' '. |
' <input type="text" size="5" name="startdis" id="startdis" value="'.$start.'" onchange="this.form.submit()" /> / '.$maxdis.' '. |
'<input type="submit" name="nextview" value=">" />'. |
'<input type="submit" name="nextview" value=">" />'. |
'<input type="submit" name="lastview" value=">|" />'; |
'<input type="submit" name="lastview" value=">|" />'; |
} |
} |
Line 805 sub groupmail_header {
|
Line 804 sub groupmail_header {
|
$groupheader .= &Apache::lonhtmlcommon::breadcrumbs( |
$groupheader .= &Apache::lonhtmlcommon::breadcrumbs( |
&mt('Group messages - [_1]',$description), |
&mt('Group messages - [_1]',$description), |
undef,undef,undef,undef,1); |
undef,undef,undef,undef,1); |
return $groupheader; |
return $groupheader.'<div class="LC_landmark" role="main">'; |
} |
} |
|
|
sub groupmail_sent { |
sub groupmail_sent { |
Line 1134 ENDDISHEADER
|
Line 1133 ENDDISHEADER
|
$r->print(&blocked_in_folder($numblocked,$startblock,$endblock,$by_ip,$clientip,$blockdom, |
$r->print(&blocked_in_folder($numblocked,$startblock,$endblock,$by_ip,$clientip,$blockdom, |
\%setters)); |
\%setters)); |
} |
} |
|
$r->print('</form>'); |
return; |
return; |
} |
} |
my $interdis = $env{'form.interdis'}; |
my $interdis = $env{'form.interdis'}; |
Line 1151 ENDDISHEADER
|
Line 1151 ENDDISHEADER
|
$r->print('<form method="post" name="disall" action="/adm/email">'. |
$r->print('<form method="post" name="disall" action="/adm/email">'. |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_row(). |
&Apache::loncommon::start_data_table_row(). |
'<th colspan="1"> </th><th>'); |
'<th colspan="1">#</th><th>'); |
if ($env{'form.sortedby'} eq "revdate") { |
if ($env{'form.sortedby'} eq "revdate") { |
$r->print('<a href = "/adm/email?sortedby=date'.$fsqs.'">'.&mt('Date').'</a></th>'); |
$r->print('<a href = "/adm/email?sortedby=date'.$fsqs.'">'.&mt('Date').'</a></th>'); |
} else { |
} else { |
Line 1230 ENDDISHEADER
|
Line 1230 ENDDISHEADER
|
} |
} |
} |
} |
my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime); |
my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime); |
$r->print('<td align="right"><span class="LC_nobreak">'.(($status eq 'new')?'<b>':''). |
$r->print('<td align="right"><span class="LC_nobreak"><label>'.(($status eq 'new')?'<b>':''). |
$count.'.'.(($status eq 'new')?'</b>':'').' '. |
$count.'.'.(($status eq 'new')?'</b>':'').' '. |
'<input type="checkbox" name="delmark"'. |
'<input type="checkbox" name="delmark"'. |
' value="'.$origID.'" /></span></td>'); |
' value="'.$origID.'" /></label></span></td>'); |
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.'">'. |
Line 1271 ENDDISHEADER
|
Line 1271 ENDDISHEADER
|
$r->print(' |
$r->print(' |
<div class="LC_columnSection"><fieldset> |
<div class="LC_columnSection"><fieldset> |
<legend>'.&mt('Message Actions').'</legend> |
<legend>'.&mt('Message Actions').'</legend> |
<table border="0" cellspacing="2" cellpadding="8"> |
<div class="LC_mail_actions"> |
<tr> |
<b>'.&mt('Select Messages').'</b><br /> |
<td><b>'.&mt('Select Messages').'</b><br /> |
|
<span class="LC_nobreak"> |
<span class="LC_nobreak"> |
<input type="button" onclick="javascript:checkAll(document.disall.delmark)" value="'.&mt('Check All').'" />'."\n". |
<input type="button" onclick="javascript:checkAll(document.disall.delmark)" value="'.&mt('Check All').'" />'."\n". |
' <input type="button" onclick="javascript:uncheckAll(document.disall.delmark)" value="'.&mt('Uncheck All').'" />'."\n". |
' <input type="button" onclick="javascript:uncheckAll(document.disall.delmark)" value="'.&mt('Uncheck All').'" />'."\n". |
'<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" /> |
'<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" /> |
</span> |
</span> |
</td>'."\n". |
</div>'."\n". |
'<td><b>'.&mt('Action').'</b><br />'."\n". |
'<div class="LC_mail_actions"><label><b>'.&mt('Action').'</b><br />'."\n". |
' <select name="checkedaction">'."\n"); |
' <select name="checkedaction">'."\n"); |
|
|
if ($folder ne 'trash') { |
if ($folder ne 'trash') { |
Line 1299 ENDDISHEADER
|
Line 1298 ENDDISHEADER
|
$r->print(' <option value="markedmove">'.&mt('Move to Folder ->'). |
$r->print(' <option value="markedmove">'.&mt('Move to Folder ->'). |
'</option>'); |
'</option>'); |
} |
} |
$r->print("\n".'</select></td>'."\n"); |
$r->print("\n".'</select></label></div>'."\n"); |
|
|
if (keys(%gotfolders) > 0) { |
if (keys(%gotfolders) > 0) { |
$r->print('<td><b>'.&mt('Destination folder').'</b><br />'); |
$r->print('<td><b>'.&mt('Destination folder').'</b><br />'); |
Line 1311 ENDDISHEADER
|
Line 1310 ENDDISHEADER
|
$r->print(&Apache::loncommon::select_form('','movetofolder',\%userfolders). |
$r->print(&Apache::loncommon::select_form('','movetofolder',\%userfolders). |
'</td>'); |
'</td>'); |
} |
} |
$r->print('<td style="vertical-align:bottom;">'. |
$r->print('<div class="LC_mail_actions">'. |
'<input type="button" name="go" value="'.&mt('Go'). |
'<br /><input type="button" name="go" value="'.&mt('Go'). |
'" onclick="javascript:validate_checkedaction()"/></td>'."\n". |
'" onclick="javascript:validate_checkedaction()"/></div>'."\n". |
'</tr></table>'."\n". |
|
'</fieldset></div>'."\n" |
'</fieldset></div>'."\n" |
); |
); |
my $postedstartdis=$startdis+1; |
my $postedstartdis=$startdis+1; |
Line 1351 sub blocked_in_folder {
|
Line 1349 sub blocked_in_folder {
|
sub compout { |
sub compout { |
my ($r,$forwarding,$replying,$broadcast,$replycrit,$folder,$dismode, |
my ($r,$forwarding,$replying,$broadcast,$replycrit,$folder,$dismode, |
$multiforward)=@_; |
$multiforward)=@_; |
|
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(&Apache::loncommon::start_page('Messages')); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Send and display messages')); |
|
$r->print('<div class="LC_landmark" role="main"><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></div>'); |
|
return; |
|
} |
my $suffix=&Apache::lonmsg::foldersuffix($folder); |
my $suffix=&Apache::lonmsg::foldersuffix($folder); |
my ($cdom,$cnum,$group,$refarg); |
my ($cdom,$cnum,$group,$refarg); |
if (exists($env{'form.group'})) { |
if (exists($env{'form.group'})) { |
Line 1423 sub compout {
|
Line 1441 sub compout {
|
'uas' => 'Upload and Send', |
'uas' => 'Upload and Send', |
'atta' => 'Attachment', |
'atta' => 'Attachment', |
'to' => 'To:', |
'to' => 'To:', |
|
'msgb' => 'Message body', |
); |
); |
my %attachmax = ( |
my %attachmax = ( |
text => &mt('(1 MB max size)'), |
text => &mt('(1 MB max size)'), |
num => 1048576, |
num => 1048576, |
); |
); |
if (!$forwarding && !$multiforward) { |
if (!$forwarding && !$multiforward) { |
$attachrow = '<tr><td colspan="3"><b>'.$lt{'atta'}.'</b> '.$attachmax{'text'} |
$attachrow = '<tr><td colspan="3"><label><b>'.$lt{'atta'}.'</b> '.$attachmax{'text'} |
.': <input type="file" name="attachment" class="LC_flUpload" multiple />' |
.': <input type="file" name="attachment" class="LC_flUpload" multiple /></label>' |
.'<input type="hidden" id="LC_free_space" value="'.$attachmax{'num'}.'" />' |
.'<input type="hidden" id="LC_free_space" value="'.$attachmax{'num'}.'" />' |
.'</td></tr>'; |
.'</td></tr>'; |
} |
} |
Line 1736 $latexHelp."<br />\n".
|
Line 1755 $latexHelp."<br />\n".
|
$r->print(&reply_to_row(\%lt)); |
$r->print(&reply_to_row(\%lt)); |
} |
} |
$r->print(&msg_subject_row($dissub,\%lt,$subj_size)); |
$r->print(&msg_subject_row($dissub,\%lt,$subj_size)); |
|
my $labeltext = &HTML::Entities::encode($lt{'msgb'}); |
$r->print(<<"ENDCOMP"); |
$r->print(<<"ENDCOMP"); |
$attachrow |
$attachrow |
</table><br /> |
</table><br /> |
$latexHelp<br /> |
$latexHelp<br /> |
<textarea name="message" id="message" cols="80" rows="15" wrap="hard" $textareaclass>$dismsg |
<textarea name="message" id="message" cols="80" rows="15" wrap="hard" $textareaclass aria-label="$labeltext">$dismsg |
</textarea> |
</textarea> |
<br /> |
<br /> |
$sendmode |
$sendmode |
Line 1764 ENDCOMP
|
Line 1784 ENDCOMP
|
<input type="hidden" name="send" value="on" /> |
<input type="hidden" name="send" value="on" /> |
<h3>$lt{'gen'}</h3> |
<h3>$lt{'gen'}</h3> |
<p> |
<p> |
Subject: <input type="text" size="50" name="subject" /> |
<label>$lt{'sb'}: <input type="text" size="50" name="subject" /></label> |
</p> |
</p> |
<p>$lt{'gmt'}:<br /> |
<p><label>$lt{'gmt'}:<br /> |
<textarea name="message" id="message" cols="60" rows="10" wrap="hard" $textareaclass>$dismsg |
<textarea name="message" id="message" cols="60" rows="10" wrap="hard" $textareaclass>$dismsg |
</textarea></p> |
</textarea></label></p> |
<p> |
<p> |
$lt{'tff'}: |
$lt{'tff'}: |
ENDBLOCK |
ENDBLOCK |
Line 1820 sub recipient_input_row {
|
Line 1840 sub recipient_input_row {
|
&Apache::loncommon::selectstudent_link('compemail','recuname', |
&Apache::loncommon::selectstudent_link('compemail','recuname', |
'recdomain'); |
'recdomain'); |
my $output = <<"ENDREC"; |
my $output = <<"ENDREC"; |
<tr><td colspan="3"><span class="LC_nobreak"><b>$lt{'to'}</b> $lt{'us'}: <input type="text" size="12" name="recuname" value="$env{'form.recname'}" /> $lt{'do'}: $domform $selectlink</span></td></tr> |
<tr><td colspan="3"><span class="LC_nobreak"><b>$lt{'to'}</b> <label>$lt{'us'}: <input type="text" size="12" name="recuname" value="$env{'form.recname'}" /></label> <label>$lt{'do'}: $domform</label> $selectlink</span></td></tr> |
ENDREC |
ENDREC |
return $output; |
return $output; |
} |
} |
Line 1842 sub additional_rec_row {
|
Line 1862 sub additional_rec_row {
|
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>$lt->{'ad'} <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><label for="additionalrec_to">$lt->{'to'}</label></td><td><input type="text" size="50" name="additionalrec_to" id="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><label for="additionalrec_cc">$cc</label></td><td><input type="text" size="50" name="additionalrec_cc" id="additionalrec_cc" /></td></tr> |
<tr><td> </td><td>$bcc</td><td><input type="text" size="50" name="additionalrec_bcc" /></td></tr></table></fieldset></td></tr> |
<tr><td> </td><td><label for="additionalrec_bcc">$bcc</label></td><td><input type="text" size="50" name="additionalrec_bcc" id="additionalrec_bcc" /></td></tr></table></fieldset></td></tr> |
ENDADD |
ENDADD |
return $output; |
return $output; |
} |
} |
Line 1874 sub submit_button_row {
|
Line 1894 sub submit_button_row {
|
|
|
sub msg_subject_row { |
sub msg_subject_row { |
my ($dissub,$lt,$subj_size,$extra) = @_; |
my ($dissub,$lt,$subj_size,$extra) = @_; |
my $output = '<tr><td colspan="3"><b>'.$lt->{'sb'}.'</b>: <input type="text" size="'. |
my $output = '<tr><td colspan="3"><label><b>'.$lt->{'sb'}.'</b>: <input type="text" size="'. |
$subj_size.'" name="subject" value="'.$dissub.'" />'.$extra. |
$subj_size.'" name="subject" value="'.$dissub.'" /></label>'.$extra. |
'</td></tr>'; |
'</td></tr>'; |
return $output; |
return $output; |
} |
} |
Line 2483 sub displaymessage {
|
Line 2503 sub displaymessage {
|
$showsymb,$env{'user.domain'},$env{'user.name'}); |
$showsymb,$env{'user.domain'},$env{'user.name'}); |
if ($symb) { |
if ($symb) { |
if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) { |
if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) { |
$showsymb = &Apache::lonenc::check_encrypt($symb); |
unless ($showsymb =~ m{^/enc/}) { |
|
$showsymb = &Apache::lonenc::encrypted($showsymb); |
|
} |
} |
} |
$symblink = '?symb='.$showsymb; |
$symblink = '?symb='.$showsymb; |
} |
} |
if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) { |
if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) { |
$showurl = $baseurl; |
unless ($showurl =~ m{^/enc/}) { |
|
$showurl = &Apache::lonenc::encrypted($showurl); |
|
} |
} |
} |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Refers to')) |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Refers to')) |
.'<a href="'.$showurl.$symblink.'">'.$restitle.'</a>' |
.'<a href="'.$showurl.$symblink.'">'.$restitle.'</a>' |
Line 2682 sub displayresource {
|
Line 2706 sub displayresource {
|
&& (&Apache::lonnet::allowed('vgr',$content{'courseid'}))) { |
&& (&Apache::lonnet::allowed('vgr',$content{'courseid'}))) { |
my $symb; |
my $symb; |
if (defined($content{'symb'})) { |
if (defined($content{'symb'})) { |
$symb = $content{'symb'}; |
$symb = &Apache::lonenc::check_decrypt($content{'symb'}); |
} else { |
} elsif (defined($content{'baseurl'})) { |
$symb=&Apache::lonnet::symbread($content{'baseurl'}); |
$symb = |
|
&Apache::lonnet::symbread(&Apache::lonenc::check_decrypt($content{'baseurl'})); |
} |
} |
# Could not get a symb, give up |
# Could not get a symb, give up |
unless ($symb) { return $content{'citation'}; } |
unless ($symb) { return $content{'citation'}; } |
Line 2733 sub header {
|
Line 2758 sub header {
|
$r->print(&Apache::loncommon::start_page('Messages', |
$r->print(&Apache::loncommon::start_page('Messages', |
$extra)); |
$extra)); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(($title?$title:'Send and display messages'))); |
(($title?$title:'Send and display messages')). |
|
'<div class="LC_landmark" role="main">'); |
} |
} |
|
|
# ---------------------------------------------------------------- Print header |
# ---------------------------------------------------------------- Print header |
Line 2800 sub sendoffmail {
|
Line 2826 sub sendoffmail {
|
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
} |
} |
if ($env{'form.send'}) { |
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) { |
|
&printheader($r,'','Sending messages blocked from your location.'); |
|
return 'blocked'; |
|
} elsif ($env{'form.send'}) { |
if (!$env{'form.multiforward'}) { |
if (!$env{'form.multiforward'}) { |
if ($group eq '') { |
if ($group eq '') { |
&printheader($r,'','Messages being sent.'); |
&printheader($r,'','Messages being sent.'); |
Line 3237 sub handler {
|
Line 3270 sub handler {
|
'sendreply','compose','sendmail','critical','recname','recdom', |
'sendreply','compose','sendmail','critical','recname','recdom', |
'recordftf','sortedby','folder','startdis','interdis', |
'recordftf','sortedby','folder','startdis','interdis', |
'showcommentbaseurl','dismode','group','subject','text','ref', |
'showcommentbaseurl','dismode','group','subject','text','ref', |
'msgstatus']); |
'msgstatus','btoken']); |
$sqs='&sortedby='.$env{'form.sortedby'}; |
$sqs='&sortedby='.$env{'form.sortedby'}; |
|
|
|
# ----------- Check if access was from balancer to server with existing session |
|
|
|
if ($env{'form.btoken'}) { |
|
my %info = &Apache::lonnet::tmpget($env{'form.btoken'}); |
|
&Apache::lonnet::tmpdel($env{'form.btoken'}); |
|
delete($env{'form.btoken'}); |
|
unless ($env{'form.display'}) { |
|
if (($info{'display'}) && ($info{'mailrecip'})) { |
|
if (&unescape($info{'mailrecip'}) eq $env{'user.name'}.':'.$env{'user.domain'}) { |
|
$env{'form.display'} = &unescape($info{'display'}); |
|
} |
|
} |
|
} |
|
} |
|
|
# ------------------------------------------------------ They checked for email |
# ------------------------------------------------------ They checked for email |
&Apache::lonnet::put('email_status',{'recnewemail'=>0}); |
&Apache::lonnet::put('email_status',{'recnewemail'=>0}); |
|
|
Line 3494 sub handler {
|
Line 3542 sub handler {
|
my $count = keys(%forwardfail); |
my $count = keys(%forwardfail); |
my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Could not forward [quant,_1,message].',$count),1); |
my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Could not forward [quant,_1,message].',$count),1); |
foreach my $key (keys(%forwardfail)) { |
foreach my $key (keys(%forwardfail)) { |
$message .= '<br />'.&mt('Could not deliver forwarded message.').'</span> '. |
$message .= '<br />'.&mt('Could not deliver forwarded message.').' '; |
&mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.')'; |
if ($forwardfail{$key} eq 'blocked') { |
|
$message .= &mt('Sending messages is blocked from your IP address'); |
|
} else { |
|
$message .= &mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.')'; |
|
} |
} |
} |
$message = &Apache::loncommon::confirmwrapper($message); |
$message = &Apache::loncommon::confirmwrapper($message); |
$r->print($message); |
$r->print($message); |
Line 3573 sub handler {
|
Line 3625 sub handler {
|
&Apache::loncommunicate::menu($r); |
&Apache::loncommunicate::menu($r); |
&disall($r,($folder?$folder:$dismode),$msgstatus); |
&disall($r,($folder?$folder:$dismode),$msgstatus); |
} |
} |
$r->print(&Apache::loncommon::end_page()); |
$r->print('</div>'.&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} |
} |
# ================================================= Main program, reset counter |
# ================================================= Main program, reset counter |