--- loncom/interface/lonmsgdisplay.pm 2008/12/22 09:08:47 1.106
+++ loncom/interface/lonmsgdisplay.pm 2009/01/15 17:21:25 1.110
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.106 2008/12/22 09:08:47 riegler Exp $
+# $Id: lonmsgdisplay.pm,v 1.110 2009/01/15 17:21:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -583,7 +583,9 @@ sub disgroup {
return;
} else {
$hasfloat = 1;
- $r->print('
');
+ unless($env{'environment.wysiwygeditor'} eq 'on') {
+ $r->print('
');
+ }
my %Sortby = (
active => {},
previous => {},
@@ -651,10 +653,13 @@ sub disgroup {
}
}
$r->print(&Apache::loncommon::end_data_table().''.
- '
');
+ '
');
}
}
}
+ unless($env{'environment.wysiwygeditor'} eq 'on') {
+ $r->print('
');
+ }
}
return $hasfloat;
}
@@ -1319,7 +1324,11 @@ sub compout {
if ($group eq '') {
my $studentsel = &discourse(\%access_status);
if ($studentsel) {
- $r->print(''.$studentsel.'
');
+ if ($env{'environment.wysiwygeditor'} eq 'on') {
+ $r->print($studentsel);
+ } else {
+ $r->print(''.$studentsel.'
');
+ }
$hasfloat = 1;
}
} else {
@@ -1411,7 +1420,11 @@ ENDREPSCRIPT
if ($env{'form.text'}) { $dismsg=$env{'form.text'}; }
if ($env{'form.subject'}) { $dissub=$env{'form.subject'}; }
if ($hasfloat) {
- $r->print($broadcast_js.'');
+ if ($env{'environment.wysiwygeditor'} eq 'on') {
+ $r->print($broadcast_js);
+ } else {
+ $r->print($broadcast_js.'
');
+ }
$onsubmit = ' onsubmit="javascript:courseRecipients();" ';
}
$r->print(
@@ -1520,7 +1533,7 @@ ENDREPSCRIPT
$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').'
';
my $subj_size;
if ($multiforward) {
@@ -1617,7 +1630,9 @@ ENDUPLOAD
}
$r->print('');
if ($hasfloat) {
- $r->print('
');
+ unless($env{'environment.wysiwygeditor'} eq 'on') {
+ $r->print('
');
+ }
}
$r->print(&generate_preview_form);
}
@@ -1667,7 +1682,7 @@ sub additional_rec_row {
+ |
| $bcc | |
ENDADD
return $output;
}
@@ -2377,7 +2392,16 @@ sub displaymessage {
$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;
for (my $i=0; $i<@{$content{'recuser'}}; $i++) {
$recipients[$i] = &Apache::loncommon::aboutmewrapper(
@@ -2404,14 +2428,6 @@ sub displaymessage {
$r->print(&Apache::loncommon::student_image_tag($content{'senderdomain'},$content{'sendername'}).'');
}
- 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)
# Subject
$r->print(''
@@ -2422,10 +2438,12 @@ sub displaymessage {
);
if ($folder eq 'sent') {
# To
- $r->print(&Apache::lonhtmlcommon::row_title(&mt('To'))
- .$tolist
- .&Apache::lonhtmlcommon::row_closure()
- );
+ if ($tolist) {
+ $r->print(&Apache::lonhtmlcommon::row_title(&mt('To'))
+ .$tolist
+ .&Apache::lonhtmlcommon::row_closure()
+ );
+ }
if ($cclist) {
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Cc'))
.$cclist
@@ -2679,13 +2697,13 @@ sub recipients_link {
$nothing=&Apache::lonhtmlcommon::javascript_nothing();
$height = 400;
$width = 600;
- my $start_page =
- &Apache::loncommon::start_page('Broadcast List', undef,
- {only_body => 1,
- js_ready => 1,});
- my $end_page = &Apache::loncommon::end_page({js_ready => 1,});
- my $body = ''.&mt("Recipients of broadcast message").'
'.
- &Apache::loncommon::start_data_table();
+ $start_page =
+ &Apache::loncommon::start_page('Broadcast List', undef,
+ {only_body => 1,
+ js_ready => 1,});
+ $end_page = &Apache::loncommon::end_page({js_ready => 1,});
+ $body = ''.&mt("Recipients of broadcast message").'
'.
+ &Apache::loncommon::start_data_table();
my $cell = 0;
$body .= &Apache::loncommon::start_data_table_row();
foreach my $item (@{$recipients->{$show.'_broadcast'}}) {