--- loncom/homework/daxepage.pm	2024/04/17 14:15:45	1.16
+++ loncom/homework/daxepage.pm	2025/02/21 06:09:37	1.18
@@ -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.16 2024/04/17 14:15:45 raeburn Exp $
+# $Id: daxepage.pm,v 1.18 2025/02/21 06:09:37 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -84,6 +84,9 @@ sub handler {
     if ($is_not_assess) {
         delete($editors{'xml'});
         $editors{'edit'} = 1;
+        $Apache::lonnet::env{'form.editmode'} = 'daxe';
+    } else {
+        $Apache::lonnet::env{'form.problemmode'} = 'daxe';
     }
     &Apache::lonhtmlcommon::clear_breadcrumbs();
     my %lt = &Apache::lonlocal::texthash(
@@ -96,6 +99,7 @@ sub handler {
                                           'edit' => 'Save and Edit',
                                           'disc' => 'Discard and View',
                                           'save' => 'Save and View',
+                                          'daxe' => 'Daxe Editor',
                                         );
     my $name = $uri;
     $name =~ s/^.*\/([^\/]+)$/$1/;
@@ -124,22 +128,23 @@ sub handler {
     if ($is_assess) {
         $editheader .= '<input type="hidden" name="problemmode" value="daxe" />'."\n";
     }
-    $editheader .= '<div class="LC_edit_problem_editxml_header">'."\n";
+    $editheader .= '<div class="LC_edit_problem_daxe_header">'."\n";
     my $saveeditbutton = '<input type="button" name="submitmode" accesskey="s" value="'.$lt{'edit'}.
                      '" onclick="'.$clickedit.'" />'."\n";
     my $exitbutton = '<input type="button" name="submitmode" accesskey="d" value="'.$lt{'disc'}.
                      '" onclick="'.$clickexit.'" />'."\n";
     my $saveexitbutton = '<input type="button" name="submitmode" accesskey="v" value="'.$lt{'save'}.
                      '" onclick="'.$clicksave.'" />'."\n";
-    $editheader .= '<table class="LC_edit_problem_header_title"><tr><td>'.
-                   $uri.'</td><td align="right"><span class="LC_nobreak">'.
+    $editheader .= '<div class="LC_landmark" style="clear:both;">'.
+                   '<div class="LC_floatleft LC_landmark" style="margin-top: 2px">'.$uri.'</div>'.
+                   '<div class="LC_floatright LC_landmark"><span class="LC_nobreak">'.
                    $saveeditbutton.$saveexitbutton.$exitbutton.'</span>';
     if ($editors{'edit'} || $editors{'xml'}) {
         my $other = (($editors{'edit'} && $editors{'xml'})? $lt{'oeds'} : $lt{'othe'});
         $editheader .= '&nbsp;&nbsp;|&nbsp;&nbsp;<span class="LC_nobreak">'.$other.':</span> '.
                        '<span class="LC_nobreak">';
         if ($is_not_assess) {
-            $editheader .= '<input type="hidden" name="editmode" value="" />'."\n".
+            $editheader .= '<input type="hidden" name="editmode" value="daxe" />'."\n".
                            '<input type="button" name="editordefault" value="'.$lt{'text'}.
                            '" onclick="javascript:seteditmode(this.form,'."'edit'".');" />'."\n";
         } else {
@@ -154,7 +159,9 @@ sub handler {
         }
         $editheader .= '</span>';
     }
-    $editheader .= '</td></tr></table></div></form>'."\n";
+    $editheader .= '</div></div>'.
+                   '<div class="LC_landmark" style="clear:both"></div>'.
+                   '</div></form>'."\n";
     my $start_collapsed = &collapsible_std_LCmenus();
     my $args = {
                 'collapsible_header' => $editheader,
@@ -172,7 +179,8 @@ sub handler {
     $request->print(<<"ENDFRAME");
 $startpage
 $script
-<div class="LC_iframecontainer" style="padding-right: 5px">
+<div class="LC_iframecontainer" style="padding-right: 5px" role="main">
+<h1 class="LC_visually_hidden">$lt{'daxe'}</h1>
 <iframe src="$dest" id="lcdiframe">$lt{'noif'} $noiframe</iframe>
 </div>
 $endpage