version 1.178, 2014/12/11 01:52:30
|
version 1.181.2.1, 2017/04/02 13:31:48
|
Line 120 my $startdis='';
|
Line 120 my $startdis='';
|
|
|
sub folderlist { |
sub folderlist { |
my ($folder,$msgstatus) = @_; |
my ($folder,$msgstatus) = @_; |
my %lt = &Apache::lonlocal::texthash( |
my %html_lt = &Apache::lonlocal::texthash( |
actn => 'Action', |
actn => 'Action', |
fold => 'Folder', |
fold => 'Folder', |
show => 'Show', |
show => 'Show', |
status => 'Message Status', |
status => 'Message Status', |
go => 'Go', |
go => 'Go', |
|
|
|
); |
|
&html_escape(\%html_lt); |
|
my %js_lt = &Apache::lonlocal::texthash( |
nnff => 'New Name for Folder', |
nnff => 'New Name for Folder', |
newn => 'New Name', |
newn => 'New Name', |
fmnb => 'Folder may not be renamed as it is a folder provided by the system.', |
fmnb => 'Folder may not be renamed as it is a folder provided by the system.', |
asth => 'Requested name already in use for a system-provided or user-defined folder.', |
asth => 'Requested name already in use for a system-provided or user-defined folder.', |
|
|
); |
); |
|
&js_escape(\%js_lt); |
|
|
# set se lastvisit for the new mail check in the toplevel menu |
# set se lastvisit for the new mail check in the toplevel menu |
&Apache::lonnet::appenv({'user.mailcheck.lastvisit'=>time}); |
&Apache::lonnet::appenv({'user.mailcheck.lastvisit'=>time}); |
Line 179 function folder_choice(targetform,caller
|
Line 184 function folder_choice(targetform,caller
|
if (targetform.folderaction.options[targetform.folderaction.selectedIndex].value == 'rename') { |
if (targetform.folderaction.options[targetform.folderaction.selectedIndex].value == 'rename') { |
for (var i=0; i<permfolders_keys.length; i++) { |
for (var i=0; i<permfolders_keys.length; i++) { |
if (permfolders_keys[i] == targetform.folder.value) { |
if (permfolders_keys[i] == targetform.folder.value) { |
alert("'"+permfolders_vals[i]+"' -- $lt{'fmnb'}"); |
alert("'"+permfolders_vals[i]+"' -- $js_lt{'fmnb'}"); |
return; |
return; |
} |
} |
} |
} |
var foldername=prompt('$lt{'nnff'}','$lt{'newn'}'); |
var foldername=prompt('$js_lt{'nnff'}','$js_lt{'newn'}'); |
if (foldername) { |
if (foldername) { |
targetform.renamed.value=foldername; |
targetform.renamed.value=foldername; |
for (var i=0; i<allfolders.length; i++) { |
for (var i=0; i<allfolders.length; i++) { |
if (allfolders[i] == foldername) { |
if (allfolders[i] == foldername) { |
alert("'"+foldername+"' $lt{'asth'}"); |
alert("'"+foldername+"' $js_lt{'asth'}"); |
return; |
return; |
} |
} |
} |
} |
Line 204 function folder_choice(targetform,caller
|
Line 209 function folder_choice(targetform,caller
|
if (newname) { |
if (newname) { |
for (var i=0; i<allfolders.length; i++) { |
for (var i=0; i<allfolders.length; i++) { |
if (allfolders[i] == newname) { |
if (allfolders[i] == newname) { |
alert("'"+newname+"' -- $lt{'asth'}"); |
alert("'"+newname+"' -- $js_lt{'asth'}"); |
return; |
return; |
} |
} |
} |
} |
Line 223 function folder_choice(targetform,caller
|
Line 228 function folder_choice(targetform,caller
|
<legend>'.&mt('Folder Actions').'</legend> |
<legend>'.&mt('Folder Actions').'</legend> |
<table border="0" cellspacing="2" cellpadding="8"> |
<table border="0" cellspacing="2" cellpadding="8"> |
<tr> |
<tr> |
<td><b>'.$lt{'fold'}.'</b><br />'."\n". |
<td><b>'.$html_lt{'fold'}.'</b><br />'."\n". |
&Apache::loncommon::select_form($folder,'folder',\%formhash).' |
&Apache::loncommon::select_form($folder,'folder',\%formhash).' |
</td> |
</td> |
<td><b>'.$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).' |
</td> |
</td> |
<td><b>'.$lt{'status'}.'</b><br />'."\n". |
<td><b>'.$html_lt{'status'}.'</b><br />'."\n". |
&Apache::loncommon::select_form($msgstatus,'msgstatus',\%statushash).' |
&Apache::loncommon::select_form($msgstatus,'msgstatus',\%statushash).' |
</td> |
</td> |
<td style="padding-right: 40px;"> |
<td style="padding-right: 40px;"> |
<b>'.$lt{'actn'}.'</b><br />'."\n".' |
<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). |
' <input type="button" value="'.$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> |
</td> |
Line 245 function folder_choice(targetform,caller
|
Line 250 function folder_choice(targetform,caller
|
<b>'.&mt('New Folder').'</b><br />'."\n".' |
<b>'.&mt('New Folder').'</b><br />'."\n".' |
<span class="LC_nobreak"> |
<span class="LC_nobreak"> |
<input type="text" size="15" name="newfolder" value="" /> |
<input type="text" size="15" name="newfolder" value="" /> |
<input type="button" value="'.$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> |
</td> |
Line 1051 sub disfolder {
|
Line 1056 sub disfolder {
|
my %setters = (); |
my %setters = (); |
my $numblocked = 0; |
my $numblocked = 0; |
my ($startblock,$endblock) = &Apache::loncommon::blockcheck(\%setters,'com'); |
my ($startblock,$endblock) = &Apache::loncommon::blockcheck(\%setters,'com'); |
my %lt = &Apache::lonlocal::texthash( |
my %js_lt = &Apache::lonlocal::texthash( |
sede => 'Select a destination folder to which the messages will be moved.', |
sede => 'Select a destination folder to which the messages will be moved.', |
nome => 'No messages have been selected to apply this action to.', |
nome => 'No messages have been selected to apply this action to.', |
chec => 'Check the checkbox for at least one message.', |
chec => 'Check the checkbox for at least one message.', |
); |
); |
|
&js_escape(\%js_lt); |
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"> |
Line 1066 sub disfolder {
|
Line 1072 sub disfolder {
|
document.disall.markedaction.value = document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value; |
document.disall.markedaction.value = document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value; |
if (document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value == 'markedmove') { |
if (document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value == 'markedmove') { |
if (document.disall.movetofolder.options[document.disall.movetofolder.selectedIndex].value == "") { |
if (document.disall.movetofolder.options[document.disall.movetofolder.selectedIndex].value == "") { |
alert("$lt{'sede'}"); |
alert("$js_lt{'sede'}"); |
return; |
return; |
} |
} |
} |
} |
Line 1083 sub disfolder {
|
Line 1089 sub disfolder {
|
} |
} |
} |
} |
if (checktotal == 0) { |
if (checktotal == 0) { |
alert("$lt{'nome'}\\n$lt{'chec'}"); |
alert("$js_lt{'nome'}\\n$js_lt{'chec'}"); |
return; |
return; |
} |
} |
document.disall.submit(); |
document.disall.submit(); |
Line 2168 sub displaymessage {
|
Line 2174 sub displaymessage {
|
my @actionlist; |
my @actionlist; |
if ($env{'user.adv'}) { |
if ($env{'user.adv'}) { |
|
|
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { |
if (($env{'request.course.id'}) && ($from_student) && |
|
(&Apache::lonnet::allowed('vgr',$env{'request.course.id'}))) { |
push(@actionlist,&Apache::loncommon::track_student_link( |
push(@actionlist,&Apache::loncommon::track_student_link( |
'View recent activity' |
'View recent activity' |
,$content{'sendername'} |
,$content{'sendername'} |
Line 2913 sub sendoffmail {
|
Line 2920 sub sendoffmail {
|
} |
} |
my @recusers; |
my @recusers; |
my @recudoms; |
my @recudoms; |
|
my %permresults; |
foreach my $address (sort(keys(%toaddr))) { |
foreach my $address (sort(keys(%toaddr))) { |
my ($recuname,$recdomain)=split(/\:/,$address); |
my ($recuname,$recdomain)=split(/\:/,$address); |
my $msgtxt = $savemsg; |
my $msgtxt = $savemsg; |
Line 2929 sub sendoffmail {
|
Line 2937 sub sendoffmail {
|
$env{'form.sendbck'}, |
$env{'form.sendbck'}, |
$env{'form.permanent'}, |
$env{'form.permanent'}, |
\$sentmessage{$address}, |
\$sentmessage{$address}, |
$nosentstore,$recipid); |
$nosentstore,$recipid, |
|
$attachmenturl,\%permresults); |
} else { |
} else { |
$r->print(&mt('Sending').' '.$recuname.':'.$recdomain.': '); |
$r->print(&mt('Sending').' '.$recuname.':'.$recdomain.': '); |
@thismsg= |
@thismsg= |
Line 2940 sub sendoffmail {
|
Line 2949 sub sendoffmail {
|
$env{'form.permanent'}, |
$env{'form.permanent'}, |
\$sentmessage{$address}, |
\$sentmessage{$address}, |
undef,undef,undef, |
undef,undef,undef, |
$nosentstore,$recipid); |
$nosentstore,$recipid, |
|
\%permresults); |
} |
} |
$msg_status{$recuname.':'.$recdomain}=join(' ',@thismsg); |
$msg_status{$recuname.':'.$recdomain}=join(' ',@thismsg); |
if ($msg_status{$recuname.':'.$recdomain} =~ /(ok|con_delayed)/) { |
if ($msg_status{$recuname.':'.$recdomain} =~ /(ok|con_delayed)/) { |
$numsent++; |
$numsent++; |
push(@recusers,$recuname); |
push(@recusers,$recuname); |
push(@recudoms,$recdomain); |
push(@recudoms,$recdomain); |
|
if ($1 eq 'ok') { |
|
$r->print('ok '); |
|
} |
|
if ($permresults{$recuname.':'.$recdomain}) { |
|
$r->print(' (email) '); |
|
} |
} |
} |
$sendstatus.=' '.join(' ',@thismsg); |
$sendstatus.=' '.join(' ',@thismsg); |
} |
} |