-
-
+
- '.$lt{'fold'}.' '."\n".
- &Apache::loncommon::select_form($folder,'folder',%formhash).'
+ | '.$lt{'fold'}.' '."\n".
+ &Apache::loncommon::select_form($folder,'folder',\%formhash).'
|
- '.$lt{'show'}.' '."\n".
+ | '.$lt{'show'}.' '."\n".
&Apache::loncommon::select_form($env{'form.interdis'},'interdis',
- %show).'
+ \%show).'
+ |
+ '.$lt{'status'}.' '."\n".
+ &Apache::loncommon::select_form($msgstatus,'msgstatus',\%statushash).'
|
- '.$lt{'status'}.' '."\n".
- &Apache::loncommon::select_form($msgstatus,'msgstatus',%statushash).'
+ | '.$lt{'actn'}.' '."\n".'
+ '.
+ &Apache::loncommon::select_form('view','folderaction',\%actions).
+ '
+
|
- '.$lt{'actn'}.' '.
- &Apache::loncommon::select_form('view','folderaction',%actions).'
- | '.
- '
+ | '.&mt('New Folder').' '."\n".'
+
+
+
+
|
- | | | |
-
-
- |
-
- '."\n".
+'."\n".
''.
''.
($folder=~/^critical/?'':'');
@@ -308,10 +304,11 @@ sub scrollbuttons {
'';
}
$output .=
- ' '
+ ''
.''.&mt($status.' messages:').' '
.&mt('showing messages [_1] through [_2] of [_3].',
$first,$finish,$total)
+ .' '
.'';
return $output;
@@ -381,7 +378,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.',$folder);
}
my %userfolders = &Apache::lonmsg::get_user_folders();
if (!defined($userfolders{$folder})) {
@@ -629,9 +626,7 @@ sub disgroup {
return;
} else {
$hasfloat = 1;
- unless($env{'environment.wysiwygeditor'} eq 'on') {
- $r->print('');
- }
+ $r->print(' ');
my %Sortby = (
active => {},
previous => {},
@@ -704,9 +699,7 @@ sub disgroup {
}
}
}
- unless($env{'environment.wysiwygeditor'} eq 'on') {
- $r->print(' ');
- }
+ $r->print(' ');
}
return $hasfloat;
}
@@ -821,6 +814,15 @@ sub discrit {
foreach my $key (sort(keys(%what))) {
my %content=&Apache::lonmsg::unpackagemsg($what{$key});
next if ($content{'senderdomain'} eq '');
+ my $description;
+ if ($content{'courseid'} ne '') {
+ if ($content{'courseid'} =~ m{/^$match_domain\_$match_courseid$}) {
+ my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'},{'one_time' => 1});
+ if ($courseinfo{'description'} ne '') {
+ $description = $courseinfo{'description'};
+ }
+ }
+ }
$result .= &Apache::lonhtmlcommon::start_pick_box()
.&Apache::lonhtmlcommon::row_title(&mt('From'),undef,'LC_oddrow_value')
.''.&Apache::loncommon::aboutmewrapper(
@@ -832,8 +834,13 @@ sub discrit {
.&Apache::lonhtmlcommon::row_closure(1)
.&Apache::lonhtmlcommon::row_title(&mt('Subject'),undef,'LC_oddrow_value')
.$content{'subject'}
- .&Apache::lonhtmlcommon::row_closure(1)
- .&Apache::lonhtmlcommon::row_title(&mt('Message'),undef,'LC_evenrow_value')
+ .&Apache::lonhtmlcommon::row_closure(1);
+ if ($description ne '') {
+ $result .= &Apache::lonhtmlcommon::row_title(&mt('Course'),undef,'LC_oddrow_value')
+ .$description
+ .&Apache::lonhtmlcommon::row_closure(1);
+ }
+ $result .= &Apache::lonhtmlcommon::row_title(&mt('Message'),undef,'LC_evenrow_value')
.''.&Apache::lontexconvert::msgtexconverted($content{'message'}).' '
.&Apache::lonhtmlcommon::row_closure()
.&Apache::lonhtmlcommon::row_title('',undef,'LC_oddrow_value')
@@ -988,10 +995,15 @@ sub get_course_desc {
if (defined($env{'course.'.$fromcid.'.description'})) {
$description = $env{'course.'.$fromcid.'.description'};
} else {
- my %courseinfo=&Apache::lonnet::coursedescription($fromcid);
- $description = $courseinfo{'description'};
+ if ($fromcid =~ m{/^$match_domain\_$match_courseid$}) {
+ my %courseinfo=&Apache::lonnet::coursedescription($fromcid,
+ {'one_time' => 1});
+ $description = $courseinfo{'description'};
+ }
+ }
+ if ($description ne '') {
+ $$descriptions{$fromcid} = $description;
}
- $$descriptions{$fromcid} = $description;
}
return $description;
}
@@ -1030,7 +1042,7 @@ sub disfolder {
my ($startblock,$endblock) = &Apache::loncommon::blockcheck(\%setters,'com');
my %lt = &Apache::lonlocal::texthash(
sede => 'Select a destination folder to which the messages will be moved.',
- nome => 'No messages have been selected to apply ths action to.',
+ nome => 'No messages have been selected to apply this action to.',
chec => 'Check the checkbox for at least one message.',
);
my $jscript = &Apache::loncommon::check_uncheck_jscript();
@@ -1101,7 +1113,9 @@ ENDDISHEADER
if ($lastdis>$#temp) { $lastdis=$#temp; }
$r->print(&scrollbuttons($startdis,$number,$firstdis,$lastdis,$totalnumber,$msgstatus));
$r->print('');
if ($hasfloat) {
- unless($env{'environment.wysiwygeditor'} eq 'on') {
- $r->print('');
- }
+ $r->print('');
}
$r->print(&generate_preview_form);
}
@@ -1739,12 +1765,18 @@ sub check_group_priv {
sub recipient_input_row {
my ($dom,%lt) = @_;
- my $domform = &Apache::loncommon::select_dom_form($dom,'recdomain');
+ my $domform;
+ if (($dom eq 'relate') && (!$env{'user.adv'})) {
+ $domform = ''.$dom.''.
+ '';
+ } else {
+ $domform = &Apache::loncommon::select_dom_form($dom,'recdomain');
+ }
my $selectlink=
&Apache::loncommon::selectstudent_link('compemail','recuname',
'recdomain');
my $output = <<"ENDREC";
-$lt{'to'} $lt{'us'}: $lt{'do'}: $domform $selectlink |
+$lt{'to'} $lt{'us'}: $lt{'do'}: $domform $selectlink |
ENDREC
return $output;
}
@@ -1992,6 +2024,7 @@ sub facetoface {
.&Apache::lonhtmlcommon::end_pick_box()
.' '
.''
+ .''
);
if (($stage ne 'query') &&
@@ -2259,13 +2292,13 @@ END
if ($blocks->{$block} eq 'on') {
$blockstatus = 'checked="checked"';
}
- $r->print(' ');
+ $r->print(' ');
}
$r->print(<<"END");
|
+
@@ -2315,13 +2348,13 @@ END
|
END
foreach my $block (@{$typeorder}) {
- $r->print(' ');
+ $r->print(' ');
}
$r->print(<<"END");
- |
- |
+ |
+
END
$r->print(&Apache::loncommon::end_data_table_row());
$r->print(&Apache::loncommon::end_data_table());
@@ -2394,7 +2427,6 @@ sub displaymessage {
my $number_of_messages = scalar(@messages); #subtract 1 for last index
# start output
&printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'});
- my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'});
# Prepare available functions
my @functionlist;
@@ -2638,12 +2670,14 @@ sub displaymessage {
}
if ($content{'group'} ne '') {
if (&check_group_priv($content{'group'})) {
- $groupcclist = join(', ',@{$recipients{'group_cc_broadcast'}});
- if ($groupcclist) {
- $r->print(&Apache::lonhtmlcommon::row_title(&mt('Group Cc'))
- .$groupcclist
- .&Apache::lonhtmlcommon::row_closure()
- );
+ if (ref($recipients{'group_cc_broadcast'}) eq 'ARRAY') {
+ $groupcclist = join(', ',@{$recipients{'group_cc_broadcast'}});
+ if ($groupcclist) {
+ $r->print(&Apache::lonhtmlcommon::row_title(&mt('Group Cc'))
+ .$groupcclist
+ .&Apache::lonhtmlcommon::row_closure()
+ );
+ }
}
}
}
@@ -2651,14 +2685,22 @@ sub displaymessage {
}
# Course
- if ($content{'courseid'}) {
- $r->print(&Apache::lonhtmlcommon::row_title(&mt($crstype))
- .$courseinfo{'description'}
- );
- if ($content{'coursesec'}) {
- $r->print(' ('.&mt('Section').': '.$content{'coursesec'}.')');
+ if ($content{'courseid'} ne '') {
+ if ($content{'courseid'} =~ m{^$match_domain\_$match_courseid$}) {
+ my %courseinfo;
+ %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'},
+ {'one_time' => 1});
+ my $description = $courseinfo{'description'};
+ if ($description ne '') {
+ $r->print(&Apache::lonhtmlcommon::row_title(&mt($crstype))
+ .$description
+ );
+ if ($content{'coursesec'}) {
+ $r->print(' ('.&mt('Section').': '.$content{'coursesec'}.')');
+ }
+ $r->print(&Apache::lonhtmlcommon::row_closure());
+ }
}
- $r->print(&Apache::lonhtmlcommon::row_closure());
}
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Time'))
.$content{'time'}
@@ -3167,7 +3209,7 @@ sub sendoffmail {
my ($recuname,$recdomain)=split(/\:/,$address);
my $msgtxt = $savemsg;
if ($toaddr{$address}) {
- $msgtxt.='
'.$toaddr{$address};
+ $msgtxt.="\n".'
'."\n".$toaddr{$address};
}
my @thismsg;
if ($msgtype eq 'critical') {
@@ -3292,6 +3334,9 @@ sub sendoffmail {
$r->print($message);
}
}
+ } else {
+ &printheader($r,'','Messages cancelled.');
+ return 'cancelled';
}
return $sendstatus;
}
@@ -3409,7 +3454,7 @@ sub handler {
&statuschange($env{'form.markdel'},'deleted',$folder);
if (!$result) {
my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Failed to delete the message.'),1);
- $message .= ''.$msg.'
';
+ $message .= ''.$msg.'
';
$message = &Apache::loncommon::confirmwrapper($message);
$r->print($message);
}
@@ -3459,7 +3504,7 @@ sub handler {
&printheader($r,'','Moved Messages');
if (!defined($gotfolders{$destfolder})) {
$r->print(&mt('Destination folder [_1] is not a valid folder',
- $destfolder));
+ ''.$destfolder.''));
} else {
my ($total,$failed,@failed_msg)=(0,0);
my @to_move = &Apache::loncommon::get_env_multiple('form.delmark');
@@ -3476,8 +3521,8 @@ sub handler {
my $message = '';
if ($failed) {
$message .= &Apache::lonhtmlcommon::confirm_success(&mt('Failed to move [quant,_1,message]',$failed),1);
- $message .= ''.
- join("
\n",@failed_msg).
+ $message .= '
'.
+ join("
\n",@failed_msg).
"
\n";
}
$message .= &Apache::lonhtmlcommon::confirm_success(&mt('Moved [quant,_1,message]',$total));
@@ -3504,8 +3549,8 @@ sub handler {
my $message = '';
if ($failed) {
$message .= &Apache::lonhtmlcommon::confirm_success(&mt('Failed to delete [quant,_1,message]',$failed),1);
- $message .= ''.
- join("
\n",@failed_msg).
+ $message .= '
'.
+ join("
\n",@failed_msg).
"
\n";
}
$message .= &Apache::lonhtmlcommon::confirm_success(&mt('Deleted [quant,_1,message]',$total));