--- loncom/interface/lonhtmlcommon.pm 2025/02/18 03:42:04 1.418 +++ loncom/interface/lonhtmlcommon.pm 2025/03/06 16:51:36 1.421 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.418 2025/02/18 03:42:04 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.421 2025/03/06 16:51:36 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2463,7 +2463,7 @@ sub docs_breadcrumbs { my @row_count; sub start_pick_box { - my ($css_class,$id) = @_; + my ($css_class,$id,$caption,$caption_class) = @_; if (defined($css_class)) { $css_class = 'class="'.$css_class.'"'; } else { @@ -2477,6 +2477,16 @@ sub start_pick_box { my $output = <<"END"; END + if (defined($caption)) { + if (defined($caption_class)) { + $caption_class = 'class="'.$caption_class.'"'; + } else { + $caption_class = 'class="LC_caption"'; + } + $output .= <<"END"; + +END + } return $output; } @@ -3976,7 +3986,7 @@ sub list_from_array { sub generate_menu { my @menu = @_; # subs for specific html elements - my ($h3, $div, $ul, $li, $a, $img) = inittags( qw(h3 div ul li a img) ); + my ($h2, $div, $ul, $li, $a, $img) = inittags( qw(h2 div ul li a img) ); my @categories; # each element represents the entire markup for a category @@ -3999,30 +4009,25 @@ sub generate_menu { src => $src, alt => mt(defined($$link{alttext}) ? $$link{alttext} : $$link{linktext}) - }), { - href => $$link{url}, - title => mt($$link{linktitle}), - class => 'LC_menubuttons_link' - }). - $a->(mt($$link{linktext}), { + }).mt($$link{linktext}), { href => $$link{url}, title => mt($$link{linktitle}), class => "LC_menubuttons_link" }). - (defined($$link{help}) ? + (defined($$link{help}) ? Apache::loncommon::help_open_topic($$link{help}) : ''), {class => "LC_menubuttons_inline_text"})); } - # wrap categorytitle in

, concatenate with + # wrap categorytitle in

, concatenate with # joined and in

$caption