--- loncom/interface/lonindexcourse.pm 2024/12/31 19:28:29 1.5 +++ loncom/interface/lonindexcourse.pm 2025/02/26 23:46:22 1.7 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Index Course # -# $Id: lonindexcourse.pm,v 1.5 2024/12/31 19:28:29 raeburn Exp $ +# $Id: lonindexcourse.pm,v 1.7 2025/02/26 23:46:22 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -93,21 +93,24 @@ sub course_index { # Output $r->print(&Apache::loncommon::start_data_table()); my $currentchar=''; + my $colheader = ''.&mt('Resource(s)').' '; + &Apache::loncommon::set_data_table_count(1); foreach my $lword (sort(keys(%indexhash))) { unless ($lword=~/\w/) { next; } if ($lword=~/^\d+$/) { next; } my $firstchar=substr($lword,0,1); if ($currentchar ne $firstchar) { $r->print(&Apache::loncommon::start_data_table_header_row(). - ''.$firstchar.' '.&Apache::loncommon::end_data_table_header_row()); + ''.$firstchar.''.$colheader.''. + &Apache::loncommon::end_data_table_header_row()."\n"); $currentchar=$firstchar; } - $r->print("\n".&Apache::loncommon::start_data_table_row()."$lword"); + $r->print("\n".&Apache::loncommon::continue_data_table_row()."$lword"); foreach my $href (split(/\,/,$indexhash{$lword})) { unless ($href) { next; } $r->print('   '.$indextitles{$href}.''); } - $r->print("".&Apache::loncommon::start_data_table_row()); + $r->print(''.&Apache::loncommon::end_data_table_row()); } $r->print(&Apache::loncommon::end_data_table()); }