--- loncom/interface/lonmenu.pm 2024/02/26 00:28:19 1.369.2.83.2.17 +++ loncom/interface/lonmenu.pm 2024/02/28 19:08:32 1.369.2.83.2.18 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369.2.83.2.17 2024/02/26 00:28:19 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.83.2.18 2024/02/28 19:08:32 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -266,7 +266,7 @@ sub prep_menuitem { # @primary_menu is filled within the BEGIN block of this module with # entries from mydesk.tab sub primary_menu { - my ($crstype,$ltimenu,$menucoll,$menuref,$links_disabled,$links_target) = @_; + my ($crstype,$ltimenu,$menucoll,$menuref,$links_disabled,$links_target,$collapsible) = @_; my (%menu,%ltiexc,%menuopts); # each element of @primary contains following array: # (link url, icon path, alt text, link text, condition, position) @@ -437,6 +437,10 @@ sub primary_menu { } my @output = ('',''); if ($menu{'left'} ne '') { + if ($collapsible) { + $menu{'left'} = ($listclass?'
  • ':'
  • '). + ' 
  • '.$menu{'left'}; + } $output[0] = "
      $menu{'left'}
    "; } if ($menu{'right'} ne '') {