--- loncom/interface/lonnotify.pm 2007/03/08 01:58:45 1.26 +++ loncom/interface/lonnotify.pm 2007/11/13 03:53:30 1.27 @@ -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 @@ function goBack(target) { '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 @@ function goBack(target) { } 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 @@ function goBack(target) { $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)) {