[LON-CAPA-cvs] cvs: loncom /interface lonnotify.pm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 13 Nov 2007 03:53:32 -0000
raeburn Mon Nov 12 22:53:32 2007 EDT
Modified files:
/loncom/interface lonnotify.pm
Log:
Style
Index: loncom/interface/lonnotify.pm
diff -u loncom/interface/lonnotify.pm:1.26 loncom/interface/lonnotify.pm:1.27
--- loncom/interface/lonnotify.pm:1.26 Wed Mar 7 20:58:45 2007
+++ loncom/interface/lonnotify.pm Mon Nov 12 22:53:30 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Sending messages
#
-# $Id: lonnotify.pm,v 1.26 2007/03/08 01:58:45 albertel Exp $
+# $Id: lonnotify.pm,v 1.27 2007/11/13 03:53:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -505,7 +505,7 @@
'Broadcast e-mail to users', $formname));
my $coursefilter = $env{'form.coursepick'};
- my %courses = ();
+ my %courses;
if ($coursefilter eq 'all') {
%courses = &Apache::lonnet::courseiddump($cdom,'.','.','.','.','.',
undef,undef,'Course');
@@ -527,8 +527,8 @@
} elsif ($coursefilter eq 'specific') {
if ($env{'form.coursetotal'} > 1) {
my @course_ids = split(/&&/,$env{'form.courselist'});
- foreach (@course_ids) {
- $courses{$_} = '';
+ foreach my $cid (@course_ids) {
+ $courses{$cid} = '';
}
} else {
$courses{$env{'form.courselist'}} = '';
@@ -581,7 +581,10 @@
$access{$type} = $type;
}
foreach my $course_id (keys(%courses)) {
- my ($cdom,$cnum) = split(/_/,$course_id);
+ my %coursehash =
+ &Apache::lonnet::coursedescription($course_id,{'one_time' => 1});
+ my $cdom = $coursehash{'domain'};
+ my $cnum = $coursehash{'num'};
&Apache::loncommon::get_course_users($cdom,$cnum,\%access,\@roles,\@sections,\%users);
}
foreach my $role (keys(%users)) {