--- loncom/homework/structuretags.pm 2010/08/07 19:24:03 1.473 +++ loncom/homework/structuretags.pm 2010/08/30 14:06:16 1.475 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.473 2010/08/07 19:24:03 raeburn Exp $ +# $Id: structuretags.pm,v 1.475 2010/08/30 14:06:16 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -177,12 +177,13 @@ sub page_start { $parstack,$parser,$safeeval); } - $extra_head .= &homework_js(); - - if ($env{'environment.wysiwygeditor'} eq 'on') { - $extra_head .= &Apache::lonhtmlcommon::dragmath_js("FCKEditMathPopup"); - } else { - $extra_head .= &Apache::lonhtmlcommon::dragmath_js("EditMathPopup"); + $extra_head .= &homework_js(). + &Apache::lonhtmlcommon::dragmath_js("EditMathPopup"); + if (&Apache::lonhtmlcommon::htmlareabrowser()) { + my %textarea_args = ( + dragmath => 'math', + ); + $extra_head .= &Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args); } my %body_args; @@ -1834,7 +1835,7 @@ sub start_part { } } elsif ($target eq 'web') { - $result.=''; + $result.=''; } } } @@ -2044,17 +2045,15 @@ sub end_startouttext { $result.=&Apache::edit::start_table($token)."".&mt('Text Block')."" .''.&mt('Delete?').' ' .&Apache::edit::deletelist($target,$token) - .''; - unless ($env{'environment.wysiwygeditor'} eq 'on') { - $result .= '' - .&Apache::lonhtmlcommon::dragmath_button($areaid,1) - .'' - .'' - .&Apache::edit::insertlist($target,$token) - .''; - } - $result.='' . - &Apache::loncommon::helpLatexCheatsheet(). + .'' + .'' + .&Apache::lonhtmlcommon::dragmath_button($areaid,1) + .'' + .'' + .&Apache::edit::insertlist($target,$token) + .'' + .'' . + &Apache::loncommon::helpLatexCheatsheet(). &Apache::edit::end_row(). &Apache::edit::start_spanning_row()."\n". &Apache::edit::editfield($token->[1],$text,"",80,8,1);