--- loncom/interface/lonmenu.pm 2023/11/03 01:12:15 1.541 +++ loncom/interface/lonmenu.pm 2023/11/19 21:28:17 1.542 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.541 2023/11/03 01:12:15 raeburn Exp $ +# $Id: lonmenu.pm,v 1.542 2023/11/19 21:28:17 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -245,7 +245,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) @@ -421,6 +421,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 '') {