--- loncom/interface/lonmsgdisplay.pm 2006/04/25 21:25:13 1.15 +++ loncom/interface/lonmsgdisplay.pm 2006/05/17 14:58:28 1.27 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.15 2006/04/25 21:25:13 albertel Exp $ +# $Id: lonmsgdisplay.pm,v 1.27 2006/05/17 14:58:28 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -125,6 +125,7 @@ use Apache::lonlocal; use Apache::loncommunicate; use Apache::lonfeedback; use Apache::lonrss(); +use Apache::lonselstudent(); # Querystring component with sorting type my $sqs; @@ -259,89 +260,21 @@ sub movemsg { # ======================================================= Display a course list sub discourse { - my $r=shift; - my $classlist = &Apache::loncoursedata::get_classlist(); - my $now=time; - my %lt=&Apache::lonlocal::texthash('cfa' => 'Check All', - 'cfs' => 'Check Section/Group', - 'cfn' => 'Uncheck All'); - $r->print(< - -  - -  - -

-ENDDISHEADER - my %coursepersonnel=&Apache::lonnet::get_course_adv_roles(); - $r->print(''); - foreach my $role (sort keys %coursepersonnel) { - foreach (split(/\,/,$coursepersonnel{$role})) { - my ($puname,$pudom)=split(/\:/,$_); - $r->print(''. - ''); - } - } - $r->print('
('.$_.'),'.$role.'
'); - 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(), - &Apache::loncoursedata::CL_STATUS(), - &Apache::loncoursedata::CL_FULLNAME(), - &Apache::loncoursedata::CL_SECTION()]); - next if ($status ne 'Active'); - next if ($env{'request.course.sec'} && - $section ne $env{'request.course.sec'}); - my $key = 'send_to_&&&'.$section.'&&&_'.$student; - if (! defined($fullname) || $fullname eq '') { $fullname = $sname; } - $r->print(''); - } - $r->print('
'.$sname.':'.$sdom.''.$section. - '
'); + return $result; } # ==================================================== Display Critical Message @@ -612,7 +545,7 @@ sub disfolder { my $numblocked = 0; &blockcheck(\%setters,\$startblock,\$endblock); $r->print(< +