--- loncom/homework/daxepage.pm	2023/11/27 23:24:04	1.9
+++ loncom/homework/daxepage.pm	2024/03/03 00:08:37	1.10
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Page with Daxe on the left side and the preview on the right side
 #
-# $Id: daxepage.pm,v 1.9 2023/11/27 23:24:04 raeburn Exp $
+# $Id: daxepage.pm,v 1.10 2024/03/03 00:08:37 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -31,6 +31,7 @@ package Apache::daxepage;
 use strict;
 
 use Apache::loncommon();
+use Apache::lonnet();
 use Apache::lonhtmlcommon();
 use Apache::lonxml();
 use Apache::edit();
@@ -117,8 +118,10 @@ sub handler {
                        '</td></tr></table>';
     }
     $editheader .= '</div></form>'."\n";
+    my $start_collapsed = &collapsible_std_LCmenus();
     my $args = {
                 'collapsible_header' => $editheader,
+                'start_collapsed'    => $start_collapsed,
                };
     my $startpage = &Apache::loncommon::start_page('Daxe: '.$name,$headjs,$args).
                     &Apache::lonmenu::constspaceform();
@@ -203,5 +206,19 @@ sub do_redirect {
     return;
 }
 
+sub collapsible_std_LCmenus {
+    my $daxecollapse = $Apache::lonnet::env{'environment.daxecollapse'};
+    unless ($daxecollapse) {
+        my %domdefs = &Apache::lonnet::get_domain_defaults($Apache::lonnet::env{'user.domain'});
+        if ($domdefs{'daxecollapse'}) {
+            $daxecollapse = 'yes';
+        }
+    }
+    if ($daxecollapse eq 'yes') {
+        return 1;
+    }
+    return;
+}
+
 1;
 __END__