version 1.198, 2022/09/17 23:38:51
|
version 1.202, 2025/01/29 09:11:10
|
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 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 2503 sub displaymessage {
|
Line 2501 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 2702 sub displayresource {
|
Line 2704 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'}; } |