--- loncom/interface/lonfeedback.pm 2006/05/08 22:07:31 1.195 +++ loncom/interface/lonfeedback.pm 2006/05/09 15:09:27 1.197 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.195 2006/05/08 22:07:31 albertel Exp $ +# $Id: lonfeedback.pm,v 1.197 2006/05/09 15:09:27 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1817,23 +1817,21 @@ sub print_sortfilter_options { $r->send_http_header; &Apache::lonenc::check_encrypt(\$symb); - my @sections = (); + my @sections; my $section_sel = ''; - my $numsections = 0; my $numvisible = 5; - my %sectioncount = (); - - $numsections = &Apache::loncommon::get_sections($env{'course.'.$env{'request.course.id'}.'.domain'},$env{'course.'.$env{'request.course.id'}.'.num'},\%sectioncount); + my %sectioncount = &Apache::loncommon::get_sections(); if ($env{'request.course.sec'} !~ /^\s*$/) { #Restrict section choice to current section @sections = ('all',$env{'request.course.sec'}); $numvisible = 2; } else { @sections = sort {$a cmp $b} keys(%sectioncount); - unshift(@sections,'all'); # Put 'all' at the front of the list - if ($numsections < 4) { - $numvisible = $numsections + 1; + if (scalar(@sections) < 4) { + $numvisible = scalar(@sections) + 1; } + unshift(@sections,'all'); # Put 'all' at the front of the list + } foreach (@sections) { $section_sel .= " $_\n"; @@ -2015,19 +2013,17 @@ sub print_showposters { } my $start_page = &Apache::loncommon::start_page('Discussion options'); - + my $table_start =&Apache::loncommon::start_data_table(); $r->print(< - - - - - - No. - Select - Fullname(Username/domain) - Posts + + $table_start + + No. + Select + Fullname(Username/domain) + Posts END my $count = 0; @@ -2039,18 +2035,19 @@ END next; } else { $count ++; - $r->print(''.$count.''.$last.', '.$first.' ('.$uname.','.$udom.')'.$postcounts{$_}.''); + $r->print(&Apache::loncommon::start_data_table_row(). + ''.$count.' + + '.$last.', '.$first.' ('.$uname.','.$udom.') + '.$postcounts{$_}.''. + &Apache::loncommon::end_data_table_row()); } } } } - + $r->print(&Apache::loncommon::end_data_table()); my $end_page = &Apache::loncommon::end_page(); $r->print(< - - -