[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonindexcourse.pm

raeburn raeburn at source.lon-capa.org
Wed Feb 26 18:04:40 EST 2025


raeburn		Wed Feb 26 23:04:40 2025 EDT

  Modified files:              
    /loncom/interface	lonindexcourse.pm loncommon.pm 
  Log:
  - Satisfy w3c xhtml validation.
  
  
Index: loncom/interface/lonindexcourse.pm
diff -u loncom/interface/lonindexcourse.pm:1.5 loncom/interface/lonindexcourse.pm:1.6
--- loncom/interface/lonindexcourse.pm:1.5	Tue Dec 31 19:28:29 2024
+++ loncom/interface/lonindexcourse.pm	Wed Feb 26 23:04:40 2025
@@ -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.6 2025/02/26 23:04:40 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -93,6 +93,7 @@
 # Output
     $r->print(&Apache::loncommon::start_data_table());
     my $currentchar='';
+    &Apache::loncommon::set_data_table_count(1);
     foreach my $lword (sort(keys(%indexhash))) {
        unless ($lword=~/\w/) { next; }
        if ($lword=~/^\d+$/) { next; }
@@ -102,12 +103,12 @@
                     '<th>'.$firstchar.'</th><th> </th>'.&Apache::loncommon::end_data_table_header_row());
           $currentchar=$firstchar;
        }
-       $r->print("\n".&Apache::loncommon::start_data_table_row()."<td>$lword</td><td>");
+       $r->print("\n".&Apache::loncommon::continue_data_table_row()."<td>$lword</td><td>");
        foreach my $href (split(/\,/,$indexhash{$lword})) {
            unless ($href) { next; }
            $r->print('   <a href="'.$href.'">'.$indextitles{$href}.'</a>');
        }
-       $r->print("</td>".&Apache::loncommon::start_data_table_row());
+       $r->print("</td>".&Apache::loncommon::end_data_table_row());
     }
     $r->print(&Apache::loncommon::end_data_table());
 }
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1465 loncom/interface/loncommon.pm:1.1466
--- loncom/interface/loncommon.pm:1.1465	Wed Feb 26 19:50:21 2025
+++ loncom/interface/loncommon.pm	Wed Feb 26 23:04:40 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1465 2025/02/26 19:50:21 raeburn Exp $
+# $Id: loncommon.pm,v 1.1466 2025/02/26 23:04:40 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -10889,6 +10889,11 @@
         return;
     }
 
+    sub set_data_table_count {
+        my ($count) = @_;
+        unshift(@row_count,$count);
+    }
+
     sub start_data_table {
 	my ($add_class,$id) = @_;
 	my $css_class = (join(' ','LC_data_table',$add_class));




More information about the LON-CAPA-cvs mailing list