--- loncom/interface/lonmsg.pm 2005/01/31 11:27:14 1.132
+++ loncom/interface/lonmsg.pm 2005/02/17 03:36:05 1.134
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.132 2005/01/31 11:27:14 www Exp $
+# $Id: lonmsg.pm,v 1.134 2005/02/17 03:36:05 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -414,7 +414,7 @@ sub user_crit_msg_raw {
=cut
sub user_crit_msg {
- my ($user,$domain,$subject,$message,$sendback)=@_;
+ my ($user,$domain,$subject,$message,$sendback,$toperm)=@_;
my $status='';
my %userenv = &Apache::lonnet::get('environment',['msgforward'],
$domain,$user);
@@ -424,10 +424,10 @@ sub user_crit_msg {
my ($forwuser,$forwdomain)=split(/\:/,$_);
$status.=
&user_crit_msg_raw($forwuser,$forwdomain,$subject,$message,
- $sendback).' ';
+ $sendback,$toperm).' ';
}
} else {
- $status=&user_crit_msg_raw($user,$domain,$subject,$message,$sendback);
+ $status=&user_crit_msg_raw($user,$domain,$subject,$message,$sendback,$toperm);
}
return $status;
}
@@ -693,7 +693,15 @@ ENDDISHEADER
}
}
$r->print('
');
- while (my ($student,$info) = each(%$classlist)) {
+ my $sort = sub {
+ my $aname=lc($classlist->{$a}[&Apache::loncoursedata::CL_FULLNAME()]);
+ if (!$aname) { $aname=$a; }
+ my $bname=lc($classlist->{$b}[&Apache::loncoursedata::CL_FULLNAME()]);
+ if (!$bname) { $bname=$b; }
+ return $aname cmp $bname;
+ };
+ foreach my $student (sort $sort (keys(%{$classlist}))) {
+ my $info=$classlist->{$student};
my ($sname,$sdom,$status,$fullname,$section) =
(@{$info}[&Apache::loncoursedata::CL_SNAME(),
&Apache::loncoursedata::CL_SDOM(),
@@ -1083,9 +1091,11 @@ sub compout {
my $crithelp = Apache::loncommon::help_open_topic("Course_Critical_Message");
$dispcrit=
' '.&mt('Send as critical message').' ' . $crithelp .
- '
'.
+ '
'.
' '.&mt('Send as critical message').' ' .
- &mt('and return receipt') . $crithelp . '';
+ &mt('and return receipt') . $crithelp .
+ '
'.
+&mt('Send copy to permanent email address (if known)').'
';
}
my %message;
my %content;
@@ -1960,13 +1970,13 @@ sub sendoffmail {
$thismsg=&user_crit_msg($recuname,$recdomain,
&Apache::lonfeedback::clear_out_html($ENV{'form.subject'}),
$msgtxt,
- $ENV{'form.sendbck'});
+ $ENV{'form.sendbck'},$ENV{'form.permanent'});
} else {
$r->print(&mt('Sending').' '.$recuname.'@'.$recdomain.': ');
$thismsg=&user_normal_msg($recuname,$recdomain,
&Apache::lonfeedback::clear_out_html($ENV{'form.subject'}),
$msgtxt,
- $content{'citation'});
+ $content{'citation'},undef,undef,$ENV{'form.permanent'});
if (($ENV{'request.course.id'}) && ($ENV{'form.sendmode'} eq 'group')) {
&user_normal_msg_raw(
$ENV{'course.'.$ENV{'request.course.id'}.'.num'},