--- loncom/interface/lonmsgdisplay.pm 2012/05/23 12:28:21 1.160
+++ loncom/interface/lonmsgdisplay.pm 2020/09/09 00:48:17 1.181.2.6
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.160 2012/05/23 12:28:21 goltermann Exp $
+# $Id: lonmsgdisplay.pm,v 1.181.2.6 2020/09/09 00:48:17 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -102,6 +102,8 @@ use HTML::TokeParser();
use Apache::Constants qw(:common);
use Apache::loncommon();
use Apache::lonhtmlcommon();
+use Apache::longroup;
+use Apache::lonnavmaps;
use Apache::lontexconvert();
use HTML::Entities();
use Apache::lonlocal;
@@ -120,21 +122,23 @@ my $startdis='';
sub folderlist {
my ($folder,$msgstatus) = @_;
- my %lt = &Apache::lonlocal::texthash(
+ my %html_lt = &Apache::lonlocal::texthash(
actn => 'Action',
fold => 'Folder',
show => 'Show',
status => 'Message Status',
go => 'Go',
+
+ );
+ &html_escape(\%html_lt);
+ my %js_lt = &Apache::lonlocal::texthash(
nnff => 'New Name for Folder',
newn => 'New Name',
- thfm => 'The folder may not be renamed',
- fmnb => 'folder may not be renamed as it is a folder provided by the system.',
- asth => 'as this name is already in use for a system-provided or user-defined folder.',
- the => 'The',
- tnfm => 'The new folder may not be named',
+ 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.',
);
+ &js_escape(\%js_lt);
# set se lastvisit for the new mail check in the toplevel menu
&Apache::lonnet::appenv({'user.mailcheck.lastvisit'=>time});
@@ -182,16 +186,16 @@ function folder_choice(targetform,caller
if (targetform.folderaction.options[targetform.folderaction.selectedIndex].value == 'rename') {
for (var i=0; i
+
'."\n".
''.
''.
@@ -261,8 +270,8 @@ sub get_permanent_folders {
my %permfolders =
&Apache::lonlocal::texthash('' => 'INBOX',
'trash' => 'TRASH',
- 'critical' => 'Critical',
- 'sent' => 'Sent Messages',
+ 'critical' => 'CRITICAL',
+ 'sent' => 'SENT MESSAGES',
);
return %permfolders;
}
@@ -378,7 +387,7 @@ sub deletefolder {
my ($folder)=@_;
my %permfolders = &get_permanent_folders();
if (defined($permfolders{$folder})) {
- return &mt('The folder "[_1]" may not be deleted.',$folder);
+ return &mt('The folder "[_1]" may not be deleted.',$permfolders{$folder});
}
my %userfolders = &Apache::lonmsg::get_user_folders();
if (!defined($userfolders{$folder})) {
@@ -543,7 +552,7 @@ sub discourse {
$result .= '
-
'.$lt{'fold'}.'
'."\n".
+ '.$html_lt{'fold'}.'
-
'."\n".
&Apache::loncommon::select_form($folder,'folder',\%formhash).'
'.$lt{'show'}.'
'."\n".
+ '.$html_lt{'show'}.'
-
'."\n".
&Apache::loncommon::select_form($env{'form.interdis'},'interdis',
\%show).'
'.$lt{'status'}.'
'."\n".
+ '.$html_lt{'status'}.'
-
'."\n".
&Apache::loncommon::select_form($msgstatus,'msgstatus',\%statushash).'
'.$lt{'actn'}.'
'."\n".'
+
+ '.$html_lt{'actn'}.'
-
'."\n".'
'.
&Apache::loncommon::select_form('view','folderaction',\%actions).
- '
'.&mt('New Folder').'
'."\n".'
+
+ '.&mt('New Folder').'
'."\n".'
-
';
if (ref($statushash) eq 'HASH') {
$statushash->{'active'} = 1;
@@ -564,7 +573,7 @@ sub discourse {
$result .= '
';
if (ref($statushash) eq 'HASH') {
$statushash->{'previous'} = 1;
@@ -587,7 +596,7 @@ sub discourse {
$result .= '';
if (ref($statushash) eq 'HASH') {
$statushash->{'future'} = 1;
@@ -662,7 +671,7 @@ sub disgroup {
}
$r->print('
-'.&mt('The messages will be assembled from all lines with the respective'."\n".'username:domain, and appended to the general message text.'));
+'.&mt('The messages will be assembled from all lines with the respective [_1][_2]username:domain[_3], and appended to the general message text.','
@@ -1887,7 +1925,7 @@ sub disfacetoface {
$env{'course.'.$env{'request.course.id'}.'.domain'},
$env{'course.'.$env{'request.course.id'}.'.num'},
'%255b'.$user.'%253a'.$domain.'%255d');
- my $result=' ".&mt('No notes, face-to-face discussion records, critical messages, or broadcast messages in this [_1].',$lctype)." ".&mt('No notes, face-to-face discussion records, critical messages or broadcast messages in this '.$lctype.'.')." '.&mt('Attachment not included - exceeded permitted length').'
','',''));
$r->print(<
'.&mt('Subject').': '.$content{'subject'}.'
'.
$content{'message'};
}
} else {
@@ -1941,7 +1978,7 @@ sub disfacetoface {
&Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).' ('.
$content{'sendername'}.':'.
$content{'senderdomain'}.') '.$content{'time'}.
- ''.
+ '
'.
&Apache::lontexconvert::msgtexconverted($content{'message'}).
'
';
}
@@ -1949,15 +1986,15 @@ $content{'sendername'}.':'.
if ($result eq '') {
my $lctype = &mt(lc(&Apache::loncommon::course_type()));
if ($target ne 'tex') {
- $r->print("'
+ .'
'
);
&disfacetoface($r,$env{'form.recuname'},$env{'form.recdomain'});
$r->print(<'
+ .'
'
.&Apache::lontexconvert::msgtexconverted($content{'message'},1)
.'
'
);
@@ -2638,6 +2687,8 @@ sub header {
if ($baseurl) {
$extra .= "