version 1.89, 2008/06/24 11:06:03
|
version 1.93, 2008/10/08 14:56:50
|
Line 1256 sub compout {
|
Line 1256 sub compout {
|
'atta' => 'Attachment', |
'atta' => 'Attachment', |
); |
); |
my %attachmax = ( |
my %attachmax = ( |
text => '(128 KB max size)', |
text => &mt('(128 KB max size)'), |
num => 131072, |
num => 131072, |
); |
); |
if (!$forwarding && !$multiforward) { |
if (!$forwarding && !$multiforward) { |
Line 2096 sub displaymessage {
|
Line 2096 sub displaymessage {
|
my %message=&Apache::lonnet::get('nohist_email'.$suffix,[$msgid]); |
my %message=&Apache::lonnet::get('nohist_email'.$suffix,[$msgid]); |
my %content=&Apache::lonmsg::unpackagemsg($message{$msgid}); |
my %content=&Apache::lonmsg::unpackagemsg($message{$msgid}); |
my $counter=0; |
my $counter=0; |
$r->print('<pre>'); |
|
my $escmsgid=&escape($msgid); |
my $escmsgid=&escape($msgid); |
foreach (@messages) { |
foreach (@messages) { |
if ($_->[5] eq $escmsgid){ |
if ($_->[5] eq $escmsgid){ |
Line 2104 sub displaymessage {
|
Line 2103 sub displaymessage {
|
} |
} |
$counter++; |
$counter++; |
} |
} |
$r->print('</pre>'); |
|
|
|
my $see_anonymous; |
my $see_anonymous; |
my $from_student = 0; |
my $from_student = 0; |
Line 2155 sub displaymessage {
|
Line 2153 sub displaymessage {
|
$symb=&Apache::lonnet::symbread($content{'baseurl'}); |
$symb=&Apache::lonnet::symbread($content{'baseurl'}); |
} |
} |
if ($env{'user.adv'}) { |
if ($env{'user.adv'}) { |
my $adv_actions; |
my $actionlist=''; |
$r->print('<table border="2" width="100%"><tr bgcolor="#FFAAAA"><td>'.&mt('Currently available actions (will open extra window)').':</td>'); |
|
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { |
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { |
$r->print('<td><b>'.&Apache::loncommon::track_student_link(&mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check').'</b></td>'); |
$actionlist.='<td><b>' |
} |
.&Apache::loncommon::track_student_link( |
|
&mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check') |
|
.'</b></td>'; |
|
} |
if (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) { |
if (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) { |
$r->print('<td><b>'.&Apache::loncommon::pprmlink(&mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check').'</b></td>'); |
$actionlist.='<td><b>' |
|
.&Apache::loncommon::pprmlink( |
|
&mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check') |
|
.'</b></td>'; |
} |
} |
if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) { |
if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) { |
$r->print('<td><b>'.&Apache::loncommon::pgrdlink(&mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check').'</b></td>'); |
$actionlist.='<td><b>' |
|
.&Apache::loncommon::pgrdlink( |
|
&mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check') |
|
.'</b></td>'; |
} |
} |
$r->print('</tr></table>'); |
if ($actionlist) { |
|
$r->print('<table border="2" width="100%">' |
|
.'<tr bgcolor="#FFAAAA"><td>' |
|
.&mt('Currently available actions (will open extra window):') |
|
.'</td>' |
|
.$actionlist |
|
.'</tr></table>'); |
|
} |
} |
} |
my ($tolist,$cclist); |
my ($tolist,$cclist); |
my (@recipients,@ccs); |
my (@recipients,@ccs); |
Line 2199 sub displaymessage {
|
Line 2212 sub displaymessage {
|
$r->print(&Apache::loncommon::student_image_tag($content{'senderdomain'},$content{'sendername'})); |
$r->print(&Apache::loncommon::student_image_tag($content{'senderdomain'},$content{'sendername'})); |
} |
} |
|
|
$r->print('<br /><b>'.&mt('Subject').':</b> '.$content{'subject'}); |
# Display LON-CAPA Message (Start) |
|
# Subject |
|
$r->print('<br />' |
|
.&Apache::lonhtmlcommon::start_pick_box() |
|
.&Apache::lonhtmlcommon::row_title(&mt('Subject')) |
|
.$content{'subject'} |
|
.&Apache::lonhtmlcommon::row_closure() |
|
); |
if ($folder eq 'sent') { |
if ($folder eq 'sent') { |
$r->print('<br /><b>'.&mt('To').':</b> '.$tolist); |
# To |
|
$r->print(&Apache::lonhtmlcommon::row_title(&mt('To')) |
|
.$tolist |
|
.&Apache::lonhtmlcommon::row_closure() |
|
); |
if ($content{'replytoaddr'}) { |
if ($content{'replytoaddr'}) { |
my ($replytoname,$replytodom) = split(/:/,$content{'replytoaddr'}); |
my ($replytoname,$replytodom) = split(/:/,$content{'replytoaddr'}); |
if ($replytoname ne '' && $replytodom ne '') { |
if ($replytoname ne '' && $replytodom ne '') { |
$r->print('<br /><b>'.&mt('Reply To').':</b> '. |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Reply To')) |
$replytoname.' '.&mt('at').' '.$replytodom); |
.&mt('[_1] at [_2]',$replytoname,$replytodom) |
|
.&Apache::lonhtmlcommon::row_closure() |
|
); |
} |
} |
} |
} |
} else { |
} else { |
$r->print('<br /><b>'.&mt('From').':</b> '. |
# From, Reply |
&Apache::loncommon::aboutmewrapper( |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('From')) |
&Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}), |
.&Apache::loncommon::aboutmewrapper( |
$content{'sendername'},$content{'senderdomain'})); |
&Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}), |
|
$content{'sendername'},$content{'senderdomain'}) |
|
); |
if ($content{'noreplies'}) { |
if ($content{'noreplies'}) { |
$r->print(' ('.&mt('No replies to sender').')'); |
$r->print(' ('.&mt('No replies to sender').')' |
|
.&Apache::lonhtmlcommon::row_closure() |
|
); |
} else { |
} else { |
if ($content{'replytoaddr'}) { |
if ($content{'replytoaddr'}) { |
my ($replytoname,$replytodom) = split(/:/,$content{'replytoaddr'}); |
my ($replytoname,$replytodom) = split(/:/,$content{'replytoaddr'}); |
if ($replytoname ne '' && $replytodom ne '') { |
if ($replytoname ne '' && $replytodom ne '') { |
$r->print('<br /><b>'.&mt('Reply To').':</b> '. |
$r->print(&Apache::lonhtmlcommon::row_closure() |
$replytoname.' '.&mt('at').' '.$replytodom); |
.&Apache::lonhtmlcommon::row_title(&mt('Reply To')) |
|
.&mt('[_1] at [_2]',$replytoname,$replytodom) |
|
.&Apache::lonhtmlcommon::row_closure() |
|
); |
|
} else { |
|
$r->print(&Apache::lonhtmlcommon::row_closure()); |
} |
} |
} else { |
} else { |
$r->print(' ('.$content{'sendername'}.' '.&mt('at').' '. |
$r->print(' ('.&mt('[_1] at [_2]',$content{'sendername'},$content{'senderdomain'}).') ' |
$content{'senderdomain'}.') '); |
.&Apache::lonhtmlcommon::row_closure() |
|
); |
} |
} |
if ($cclist) { |
if ($cclist) { |
$r->print('<br /><b>'.&mt('Cc').':</b> '.$cclist); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Cc')) |
|
.$cclist |
|
.&Apache::lonhtmlcommon::row_closure() |
|
); |
|
|
} |
} |
} |
} |
} |
} |
|
|
|
# Course |
if ($content{'courseid'}) { |
if ($content{'courseid'}) { |
$r->print('<br /><b>'.&mt($crstype).':</b> '.$courseinfo{'description'}); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt($crstype)) |
|
.$courseinfo{'description'} |
|
); |
if ($content{'coursesec'}) { |
if ($content{'coursesec'}) { |
$r->print(' ('.&mt('Section').': '.$content{'coursesec'}.')'); |
$r->print(' ('.&mt('Section').': '.$content{'coursesec'}.')'); |
} |
} |
|
$r->print(&Apache::lonhtmlcommon::row_closure()); |
} |
} |
$r->print('<br /><b>'.&mt('Time').':</b> '.$content{'time'}); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Time')) |
|
.$content{'time'} |
|
.&Apache::lonhtmlcommon::row_closure() |
|
); |
|
|
|
# Refers to |
if ($baseurl) { |
if ($baseurl) { |
if (defined($content{'courseid'}) && defined($env{'request.course.id'})) { |
if (defined($content{'courseid'}) && defined($env{'request.course.id'})) { |
if ($content{'courseid'} eq $env{'request.course.id'}) { |
if ($content{'courseid'} eq $env{'request.course.id'}) { |
Line 2256 sub displaymessage {
|
Line 2306 sub displaymessage {
|
if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) { |
if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) { |
$showurl = $baseurl; |
$showurl = $baseurl; |
} |
} |
$r->print('<br /><b>'.&mt('Refers to').':</b> <a href="'.$showurl.$symblink.'">'.$restitle.'</a>'); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Refers to')) |
|
.'<a href="'.$showurl.$symblink.'">'.$restitle.'</a>' |
|
.&Apache::lonhtmlcommon::row_closure() |
|
); |
$refers_to = 1; |
$refers_to = 1; |
} |
} |
} |
} |
Line 2269 sub displaymessage {
|
Line 2322 sub displaymessage {
|
$content{'courseid'}); |
$content{'courseid'}); |
if ($unencurl ne '') { |
if ($unencurl ne '') { |
if (&Apache::lonnet::allowed('bre',$unencurl)) { |
if (&Apache::lonnet::allowed('bre',$unencurl)) { |
$r->print('<br /><b>'.&mt('Refers to'). |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Refers to')) |
':</b> <a href="'.$unencurl.'">'. |
.'<a href="'.$unencurl.'">'.$restitle.'</a>' |
$restitle.'</a>'); |
.&Apache::lonhtmlcommon::row_closure() |
|
); |
} |
} |
} |
} |
} |
} |
} |
} |
} else { |
} else { |
if (&Apache::lonnet::allowed('bre',$baseurl)) { |
if (&Apache::lonnet::allowed('bre',$baseurl)) { |
$r->print('<br /><b>'.&mt('Refers to'). |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Refers to')) |
':</b> <a href="'.$baseurl. |
.'<a href="'.$baseurl.'">'.$restitle.'</a>' |
'">'.$restitle.'</a>'); |
.&Apache::lonhtmlcommon::row_closure() |
|
); |
|
|
} |
} |
} |
} |
} |
} |
} |
} |
$r->print('<p><pre>'. |
|
&Apache::lontexconvert::msgtexconverted($content{'message'},1). |
# Message |
'</pre><hr />'.&displayresource(%content).'</p>'); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Message')) |
|
.'<pre>' |
|
.&Apache::lontexconvert::msgtexconverted($content{'message'},1) |
|
.'</pre>' |
|
); |
|
if (&displayresource(%content)) { |
|
$r->print(&Apache::lonhtmlcommon::row_closure() |
|
.&Apache::lonhtmlcommon::row_title(&mt('Resource Details')) |
|
.&displayresource(%content) |
|
); |
|
} |
|
$r->print(&Apache::lonhtmlcommon::row_closure(1). |
|
&Apache::lonhtmlcommon::end_pick_box()); |
|
# Display LON-CAPA Message (End) |
return; |
return; |
} |
} |
|
|