--- loncom/interface/lonmsgdisplay.pm 2009/01/04 17:43:19 1.107 +++ loncom/interface/lonmsgdisplay.pm 2009/08/28 23:29:45 1.114.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.107 2009/01/04 17:43:19 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.114.2.1 2009/08/28 23:29:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -544,7 +544,7 @@ sub discourse { \%defaultUsers, 1, "selectedusers",0,'email') ) { - $result .= '
'.&mt('Bcc: course members with future access').'
'; + $result .= '
'.&mt('Bcc: course members with future access').''; $result .= $tmptext.'
'; if (ref($statushash) eq 'HASH') { $statushash->{'future'} = 1; @@ -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; } @@ -833,6 +838,7 @@ sub sortedmessages { } foreach my $msgid (@messages) { + next if ($msgid eq ''); my $esc_msgid=&escape($msgid); my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid,$processid,$symb,$error) = &Apache::lonmsg::unpackmsgid($esc_msgid,$folder,undef, @@ -1073,11 +1079,13 @@ ENDDISHEADER $r->print("\n"); my $suffix = &Apache::lonmsg::foldersuffix($folder); + my $count = $firstdis; for (my $n=$firstdis;$n<=$lastdis;$n++) { my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID, $description,$recv_name,$recv_domain)= @{$temp[$n]}; if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) { + $count ++; if ($status eq 'new') { $r->print(''); } elsif ($status eq 'read') { @@ -1109,7 +1117,6 @@ ENDDISHEADER } } my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime); - my $count = $n +1; $r->print(''.(($status eq 'new')?'':''). $count.'.'.(($status eq 'new')?'':'').' '. 'print('
'.$studentsel.'
'); + if ($env{'environment.wysiwygeditor'} eq 'on') { + $r->print($studentsel); + } else { + $r->print('
'.$studentsel.'
'); + } $hasfloat = 1; } } else { @@ -1411,7 +1422,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 +1535,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 +1632,9 @@ ENDUPLOAD } $r->print(''); if ($hasfloat) { - $r->print('
'); + unless($env{'environment.wysiwygeditor'} eq 'on') { + $r->print('
'); + } } $r->print(&generate_preview_form); } @@ -1667,7 +1684,7 @@ sub additional_rec_row {
$lt->{'ad'} ($exmpl): -
 $lt->{'to'}
 $cc
 $bcc
+ $bcc ENDADD return $output; } @@ -2682,13 +2699,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'}}) { @@ -3468,7 +3485,7 @@ sub handler { my $showfolder = $env{'form.newfolder'}; my ($makeresult,$warning) = &makefolder($env{'form.newfolder'}); if ($makeresult eq 'ok') { - $r->print(&mt('Mail folder "[_1]" created.',$showfolder).'
'); + $r->print(&mt('Folder "[_1]" created.',$showfolder).'
'); } else { $r->print(&mt('Creation failed.').' '.$makeresult.'
'. $warning); @@ -3483,7 +3500,7 @@ sub handler { my $showfolder = ''; my $delresult = &deletefolder($folder); if ($delresult eq 'ok') { - $r->print(&mt('Mail folder "[_1]" deleted.',$folder).'
'); + $r->print(&mt('Folder "[_1]" deleted.',$folder).'
'); $env{'form.folder'} = ''; } else { $r->print(&mt('Deletion failed.').' '.$delresult.'
'); @@ -3496,7 +3513,7 @@ sub handler { my $showfolder = $env{'form.renamed'}; my $renresult = &renamefolder($folder); if ($renresult eq 'ok') { - $r->print(&mt('Mail folder "[_1]" renamed "[_2]".',$folder,$showfolder).'
'); + $r->print(&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder).'
'); } else { $r->print(&mt('Renaming failed.').' '.$renresult.'
'); $showfolder = $folder;