--- loncom/interface/lonmsg.pm 2004/03/26 16:57:53 1.93 +++ loncom/interface/lonmsg.pm 2004/03/31 05:24:00 1.96 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging # -# $Id: lonmsg.pm,v 1.93 2004/03/26 16:57:53 www Exp $ +# $Id: lonmsg.pm,v 1.96 2004/03/31 05:24:00 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -101,6 +101,7 @@ use Apache::lontexconvert(); use HTML::Entities(); use Mail::Send; use Apache::lonlocal; +use Apache::loncommunicate; # Querystring component with sorting type my $sqs; @@ -109,15 +110,15 @@ my $sqs; sub packagemsg { my ($subject,$message,$citation,$baseurl,$attachmenturl)=@_; - $message =&HTML::Entities::encode($message); - $citation=&HTML::Entities::encode($citation); - $subject =&HTML::Entities::encode($subject); + $message =&HTML::Entities::encode($message,'<>&"'); + $citation=&HTML::Entities::encode($citation,'<>&"'); + $subject =&HTML::Entities::encode($subject,'<>&"'); #remove machine specification $baseurl =~ s|^http://[^/]+/|/|; - $baseurl =&HTML::Entities::encode($baseurl); + $baseurl =&HTML::Entities::encode($baseurl,'<>&"'); #remove machine specification $attachmenturl =~ s|^http://[^/]+/|/|; - $attachmenturl =&HTML::Entities::encode($attachmenturl); + $attachmenturl =&HTML::Entities::encode($attachmenturl,'<>&"'); my $now=time; $msgcount++; @@ -756,7 +757,7 @@ ENDDISHEADER # ============================================================== Compose output sub compout { - my ($r,$forwarding,$replying,$broadcast)=@_; + my ($r,$forwarding,$replying,$broadcast,$replycrit)=@_; if ($broadcast eq 'individual') { &printheader($r,'/adm/email?compose=individual', @@ -776,6 +777,9 @@ sub compout { text=>"Display Message"}); &printheader($r,'/adm/email?replyto='.&Apache::lonnet::escape($replying), 'Replying to a Message'); + } elsif ($replycrit) { + $r->print('

'.&mt('Replying to a Critical Message').'

'); + $replying=$replycrit; } else { &printheader($r,'/adm/email?compose=upload', 'Distribute from Uploaded File'); @@ -1151,7 +1155,7 @@ sub handler { my $msgid=$1; $r->print(''.&mt('Confirming Receipt').': '. &user_crit_received($msgid).'
'); - &compout($r,'',$msgid); + &compout($r,'','','',$msgid); } } &discrit($r); @@ -1246,13 +1250,15 @@ sub handler { $r->print($thismsg.'
'); $sendstatus.=' '.$thismsg; } + } else { + &printheader($r,'','No messages sent.'); } if ($sendstatus=~/^(\s*(?:ok|con_delayed)\s*)*$/) { $r->print('
'.&mt('Completed.').''); if ($ENV{'form.displayedcrit'}) { &discrit($r); } else { - &disall($r); + &Apache::loncommunicate::menu($r); } } else { $r->print(