--- loncom/homework/structuretags.pm 2017/03/14 12:20:57 1.512.2.13 +++ loncom/homework/structuretags.pm 2015/09/14 13:45:19 1.539 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.512.2.13 2017/03/14 12:20:57 raeburn Exp $ +# $Id: structuretags.pm,v 1.539 2015/09/14 13:45:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -270,7 +270,7 @@ sub homework_js { $jstimeout = 1000 * $timeout; } return &Apache::loncommon::resize_textarea_js(). - &Apache::loncommon::colorfuleditor_js(). + &Apache::loncommon::colorfuleditor_js(). &setmode_javascript(). <<"JS"; @@ -419,13 +417,9 @@ sub page_start { $extra_head .= &homework_js(). &Apache::lonhtmlcommon::dragmath_js("EditMathPopup"); if (&Apache::lonhtmlcommon::htmlareabrowser()) { - my %textarea_args; - if (($env{'request.state'} ne 'construct') || - ($env{'environment.nocodemirror'})) { - %textarea_args = ( + my %textarea_args = ( dragmath => 'math', ); - } $extra_head .= &Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args); } my $is_task = ($env{'request.uri'} =~ /\.task$/); @@ -496,7 +490,9 @@ sub page_start { } } if ($needs_upload) { - $extra_head .= &Apache::lonhtmlcommon::file_submissionchk_js(); + $extra_head .= &Apache::lonhtmlcommon::file_submissionchk_js() + .''; } } @@ -774,9 +770,7 @@ sub problem_edit_buttons { if ($mode eq 'editxml') { $result.=&problem_edit_action_button('subedit','edit','e','Edit',1); $result.=&problem_edit_action_button('subundo','undoxml','u','Undo',1); - if ($env{'environment.nocodemirror'}) { - $result.=&Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1); - } + $result.=&Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1); } else { $result.=&problem_edit_action_button('subeditxml','editxml','x','EditXML',1); $result.=&problem_edit_action_button('subundo','undo','u','Undo',1); @@ -792,9 +786,9 @@ sub problem_edit_header {
'.&mt('Problem Editing').$mode.&Apache::loncommon::help_open_menu('Problem Editing','Problem_Editor_XML_Index',5,'Authoring').' -
'. - ''. - &problem_edit_buttons(); +
'. + ''. + &problem_edit_buttons(); $return .= '
' . &Apache::lonxml::message_location(); $return .= ' @@ -822,7 +816,6 @@ sub problem_edit_header { return $return; } - sub problem_edit_footer { my $resource = $env{'request.ambiguous'}; return '
@@ -898,7 +891,7 @@ sub problem_web_to_edit_header { ".&mt("Problem Type:")."