--- loncom/homework/daxepage.pm 2024/03/03 00:08:37 1.10 +++ loncom/homework/daxepage.pm 2024/03/03 18:16:27 1.11 @@ -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.10 2024/03/03 00:08:37 raeburn Exp $ +# $Id: daxepage.pm,v 1.11 2024/03/03 18:16:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -75,6 +75,7 @@ sub handler { 'oeds' => 'other editors', 'othe' => 'other editor', 'edit' => 'Edit', + 'exit' => 'Exit Daxe', ); my $name = $uri; $name =~ s/^.*\/([^\/]+)$/$1/; @@ -83,15 +84,20 @@ sub handler { my $headjs = &Apache::loncommon::iframe_wrapper_headjs(). &toggle_LCmenus_js(). &Apache::edit::js_change_detection(); + my $clickexit; if ($is_assess) { $headjs .= &Apache::lonxml::setmode_javascript(); + $clickexit = "javascript:setmode(this.form,'view')"; } else { $headjs .= &Apache::lonxml::seteditor_javascript(); + $clickexit = "javascript:seteditmode(this.form,'view')"; } my $form_events = &Apache::edit::form_change_detection(); my $editheader = '
'. ''."\n". '
'."\n"; + my $exitbutton = ''."\n"; if ($editors{'edit'} || $editors{'xml'}) { my $other = (($editors{'edit'} && $editors{'xml'})? $lt{'oeds'} : $lt{'othe'}); $editheader .= '
'. @@ -111,11 +117,12 @@ sub handler { 'onclick="javascript:setmode(this.form,'."'editxml'".')" />'."\n"; } } - $editheader .= '
'; + $editheader .= '  |  '.$exitbutton.''; } else { $editheader .= '
'. $uri. - '
'; + ''. + $exitbutton.''; } $editheader .= '
'."\n"; my $start_collapsed = &collapsible_std_LCmenus();