version 1.106, 2008/12/22 09:08:47
|
version 1.123, 2009/05/08 12:06:32
|
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 583 sub disgroup {
|
Line 586 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 651 sub disgroup {
|
Line 656 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 833 sub sortedmessages {
|
Line 841 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 1073 ENDDISHEADER
|
Line 1082 ENDDISHEADER
|
$r->print("</tr>\n"); |
$r->print("</tr>\n"); |
|
|
my $suffix = &Apache::lonmsg::foldersuffix($folder); |
my $suffix = &Apache::lonmsg::foldersuffix($folder); |
|
my $count = 0; |
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 1120 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 1180 ENDDISHEADER
|
Line 1190 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 1319 sub compout {
|
Line 1329 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 1411 ENDREPSCRIPT
|
Line 1425 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 1538 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 1581 $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 1635 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 1667 sub additional_rec_row {
|
Line 1687 sub additional_rec_row {
|
<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><b>$lt->{'ad'}</b> <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 1870 sub facetoface {
|
Line 1890 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 1915 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 2133 END
|
Line 2164 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 2231 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 2263 sub displaymessage {
|
Line 2294 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 |
# Print functions |
|
my $legendtext='<span class="LC_mail_functions">' |
|
.&mt('Functions') |
|
.'</span>'; |
$r->print('<div class="LC_left_float">' |
$r->print('<div class="LC_left_float">' |
.'<fieldset>' |
.&Apache::lontemplate::start_functionslist($legendtext) |
.'<legend><span class="LC_mail_functions">' |
); |
.&mt('Functions') |
foreach my $item (@functionlist) { |
.'</span></legend>' |
$r->print(&Apache::lontemplate::item_functionslist($item)); |
.$functionlist |
} |
.'</fieldset>' |
$r->print(&Apache::lontemplate::end_functionslist() |
.'</div>' |
.'</div>' |
); |
); |
|
|
Line 2329 sub displaymessage {
|
Line 2345 sub displaymessage {
|
$symb=&Apache::lonnet::symbread($content{'baseurl'}); |
$symb=&Apache::lonnet::symbread($content{'baseurl'}); |
} |
} |
if ($env{'user.adv'}) { |
if ($env{'user.adv'}) { |
my $actionlist=''; |
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 |
# Print actions |
if ($actionlist) { |
if (@actionlist) { |
|
$legendtext=&mt('[_1]Currently available actions[_2] (will open extra window):' |
|
,'<span class="LC_mail_functions">','</span>'); |
$r->print('<div class="LC_left_float">' |
$r->print('<div class="LC_left_float">' |
.'<fieldset>' |
.&Apache::lontemplate::start_functionslist($legendtext) |
.'<legend>' |
); |
.&mt('[_1]Currently available actions[_2] (will open extra window):','<span class="LC_mail_functions">','</span>') |
foreach my $item (@actionlist) { |
.'</legend>' |
$r->print(&Apache::lontemplate::item_functionslist($item)); |
.$actionlist |
} |
.'</fieldset>' |
$r->print(&Apache::lontemplate::end_functionslist() |
.'</div>' |
.'</div>' |
); |
); |
} |
} |
Line 2377 sub displaymessage {
|
Line 2400 sub displaymessage {
|
$bcclist = join(', ',@{$recipients{'bcc'}}); |
$bcclist = join(', ',@{$recipients{'bcc'}}); |
} |
} |
} |
} |
if (!$tolist && ref($content{'recuser'}) eq 'ARRAY') { |
|
|
my $broadcast_link; |
|
if (($content{'courseid'}) && ($content{'recipid'} && |
|
(ref($recipients{'course_broadcast'}) eq 'ARRAY') || |
|
(ref($recipients{'group_cc_broadcast'}) eq 'ARRAY') || |
|
(ref($recipients{'group_bcc_broadcast'}) eq 'ARRAY'))) { |
|
$broadcast_link = &recipients_link($r,\%content,\%recipients); |
|
} |
|
|
|
if (((!$tolist) && (!$broadcast_link)) && ref($content{'recuser'}) eq 'ARRAY') { |
my @recipients; |
my @recipients; |
for (my $i=0; $i<@{$content{'recuser'}}; $i++) { |
for (my $i=0; $i<@{$content{'recuser'}}; $i++) { |
$recipients[$i] = &Apache::loncommon::aboutmewrapper( |
$recipients[$i] = &Apache::loncommon::aboutmewrapper( |
Line 2404 sub displaymessage {
|
Line 2436 sub displaymessage {
|
$r->print(&Apache::loncommon::student_image_tag($content{'senderdomain'},$content{'sendername'}).'</br>'); |
$r->print(&Apache::loncommon::student_image_tag($content{'senderdomain'},$content{'sendername'}).'</br>'); |
} |
} |
|
|
my $broadcast_link; |
|
if (($content{'courseid'}) && ($content{'recipid'} && |
|
(ref($recipients{'course_broadcast'}) eq 'ARRAY') || |
|
(ref($recipients{'group_cc_broadcast'}) eq 'ARRAY') || |
|
(ref($recipients{'group_bcc_broadcast'}) eq 'ARRAY'))) { |
|
$broadcast_link = &recipients_link($r,\%content,\%recipients); |
|
} |
|
|
|
# Display LON-CAPA Message (Start) |
# Display LON-CAPA Message (Start) |
# Subject |
# Subject |
$r->print('</div>' |
$r->print('</div>' |
Line 2422 sub displaymessage {
|
Line 2446 sub displaymessage {
|
); |
); |
if ($folder eq 'sent') { |
if ($folder eq 'sent') { |
# To |
# To |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('To')) |
if ($tolist) { |
.$tolist |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('To')) |
.&Apache::lonhtmlcommon::row_closure() |
.$tolist |
); |
.&Apache::lonhtmlcommon::row_closure() |
|
); |
|
} |
if ($cclist) { |
if ($cclist) { |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Cc')) |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Cc')) |
.$cclist |
.$cclist |
Line 2679 sub recipients_link {
|
Line 2705 sub recipients_link {
|
$nothing=&Apache::lonhtmlcommon::javascript_nothing(); |
$nothing=&Apache::lonhtmlcommon::javascript_nothing(); |
$height = 400; |
$height = 400; |
$width = 600; |
$width = 600; |
my $start_page = |
$start_page = |
&Apache::loncommon::start_page('Broadcast List', undef, |
&Apache::loncommon::start_page('Broadcast List', undef, |
{only_body => 1, |
{only_body => 1, |
js_ready => 1,}); |
js_ready => 1,}); |
my $end_page = &Apache::loncommon::end_page({js_ready => 1,}); |
$end_page = &Apache::loncommon::end_page({js_ready => 1,}); |
my $body = '<h3>'.&mt("Recipients of broadcast message").'</h3>'. |
$body = '<h3>'.&mt("Recipients of broadcast message").'</h3>'. |
&Apache::loncommon::start_data_table(); |
&Apache::loncommon::start_data_table(); |
my $cell = 0; |
my $cell = 0; |
$body .= &Apache::loncommon::start_data_table_row(); |
$body .= &Apache::loncommon::start_data_table_row(); |
foreach my $item (@{$recipients->{$show.'_broadcast'}}) { |
foreach my $item (@{$recipients->{$show.'_broadcast'}}) { |
Line 2782 sub displayresource {
|
Line 2808 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 3161 sub sendoffmail {
|
Line 3186 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 3465 sub handler {
|
Line 3490 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(&mt('Folder "[_1]" created.',$showfolder).'<br />'); |
} else { |
} else { |
$r->print(&mt('Creation failed.').' '.$makeresult.'<br />'. |
$r->print(&mt('Creation failed.').' '.$makeresult.'<br />'. |
$warning); |
$warning); |
Line 3480 sub handler {
|
Line 3505 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(&mt('Folder "[_1]" deleted.',$folder).'<br />'); |
$env{'form.folder'} = ''; |
$env{'form.folder'} = ''; |
} else { |
} else { |
$r->print(&mt('Deletion failed.').' '.$delresult.'<br />'); |
$r->print(&mt('Deletion failed.').' '.$delresult.'<br />'); |
Line 3493 sub handler {
|
Line 3518 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(&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder).'<br />'); |
} else { |
} else { |
$r->print(&mt('Renaming failed.').' '.$renresult.'<br />'); |
$r->print(&mt('Renaming failed.').' '.$renresult.'<br />'); |
$showfolder = $folder; |
$showfolder = $folder; |