--- loncom/interface/lonmsgdisplay.pm 2008/12/07 19:29:29 1.101
+++ loncom/interface/lonmsgdisplay.pm 2009/01/12 04:11:25 1.109
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.101 2008/12/07 19:29:29 bisitz Exp $
+# $Id: lonmsgdisplay.pm,v 1.109 2009/01/12 04:11:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -353,7 +353,7 @@ sub makefolder {
}
} else {
$outcome =
- &mt('Error - could not obtain lock on e-mail folders record.');
+ &mt('Error - could not obtain lock on message folders record.');
}
return ($outcome,$warning);
}
@@ -555,17 +555,16 @@ sub discourse {
}
sub disgroup {
- my ($cdom,$cnum,$group,$access_status) = @_;
- my $result;
+ my ($r,$cdom,$cnum,$group,$access_status) = @_;
+ my $hasfloat;
# Needs to be in a course
if (!($env{'request.course.fn'})) {
- $result = &mt('Error: you must have a course role selected to be able to send a broadcast
-e-mail to a group in the course.');
- return $result;
+ $r->print(''.&mt('Error: you must have a course role selected to be able to send a broadcast message to a group in the course.').'');
+ return;
}
if ($cdom eq '' || $cnum eq '') {
- $result = &mt('Error: could not determine domain or number of course');
- return $result;
+ $r->print(''.&mt('Error: could not determine domain or number of course').'');
+ return;
}
my ($memberinfo,$numitems) =
&Apache::longroup::group_memberlist($cdom,$cnum,$group,{},[]);
@@ -578,10 +577,13 @@ e-mail to a group in the course.');
push(@statustypes,('future','previous'));
}
if (keys(%{$memberinfo}) == 0) {
- $result = &mt('As this group has no members, there are no '.
- 'recipients to select.');
- return $result;
+ $r->print(''.
+ &mt('As this group has no members, there are no recipients to select').
+ '');
+ return;
} else {
+ $hasfloat = 1;
+ $r->print('
');
my %Sortby = (
active => {},
previous => {},
@@ -607,7 +609,7 @@ e-mail to a group in the course.');
push(@{$Sortby{$status}{$$memberinfo{$user}{fullname}}},$user);
}
}
- $result .= &group_check_uncheck();
+ $r->print(&group_check_uncheck());
foreach my $status (@statustypes) {
if (ref($numitems) eq 'HASH') {
if ((defined($$numitems{$status})) && ($$numitems{$status})) {
@@ -615,46 +617,46 @@ e-mail to a group in the course.');
if (ref($access_status) eq 'HASH') {
$access_status->{$status} = $$numitems{$status};
}
- $result.='