version 1.6, 2025/02/26 23:04:40
|
version 1.7, 2025/02/26 23:46:22
|
Line 93 sub course_index {
|
Line 93 sub course_index {
|
# Output |
# Output |
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(&Apache::loncommon::start_data_table()); |
my $currentchar=''; |
my $currentchar=''; |
|
my $colheader = '<span class="LC_visually_hidden">'.&mt('Resource(s)').'</span> '; |
&Apache::loncommon::set_data_table_count(1); |
&Apache::loncommon::set_data_table_count(1); |
foreach my $lword (sort(keys(%indexhash))) { |
foreach my $lword (sort(keys(%indexhash))) { |
unless ($lword=~/\w/) { next; } |
unless ($lword=~/\w/) { next; } |
Line 100 sub course_index {
|
Line 101 sub course_index {
|
my $firstchar=substr($lword,0,1); |
my $firstchar=substr($lword,0,1); |
if ($currentchar ne $firstchar) { |
if ($currentchar ne $firstchar) { |
$r->print(&Apache::loncommon::start_data_table_header_row(). |
$r->print(&Apache::loncommon::start_data_table_header_row(). |
'<th>'.$firstchar.'</th><th> </th>'.&Apache::loncommon::end_data_table_header_row()); |
'<th>'.$firstchar.'</th><th>'.$colheader.'</th>'. |
|
&Apache::loncommon::end_data_table_header_row()."\n"); |
$currentchar=$firstchar; |
$currentchar=$firstchar; |
} |
} |
$r->print("\n".&Apache::loncommon::continue_data_table_row()."<td>$lword</td><td>"); |
$r->print("\n".&Apache::loncommon::continue_data_table_row()."<td>$lword</td><td>"); |
Line 108 sub course_index {
|
Line 110 sub course_index {
|
unless ($href) { next; } |
unless ($href) { next; } |
$r->print(' <a href="'.$href.'">'.$indextitles{$href}.'</a>'); |
$r->print(' <a href="'.$href.'">'.$indextitles{$href}.'</a>'); |
} |
} |
$r->print("</td>".&Apache::loncommon::end_data_table_row()); |
$r->print('</td>'.&Apache::loncommon::end_data_table_row()); |
} |
} |
$r->print(&Apache::loncommon::end_data_table()); |
$r->print(&Apache::loncommon::end_data_table()); |
} |
} |