--- loncom/homework/structuretags.pm 2010/08/16 18:09:28 1.465.2.3
+++ loncom/homework/structuretags.pm 2010/08/16 18:38:28 1.465.2.4
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.465.2.3 2010/08/16 18:09:28 raeburn Exp $
+# $Id: structuretags.pm,v 1.465.2.4 2010/08/16 18:38:28 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;
@@ -405,8 +406,6 @@ sub problem_edit_footer {
'.
-
- &Apache::lonhtmlcommon::htmlareaselectactive(&Apache::lonhtmlcommon::get_htmlareafields()).
"\n\n".&Apache::loncommon::end_page();
}
@@ -1198,7 +1197,6 @@ sub end_problem {
if ($target ne 'tex' &&
$env{'form.answer_output_mode'} ne 'tex') {
$result.="";
- $result.= &Apache::lonhtmlcommon::htmlareaselectactive(&Apache::lonhtmlcommon::get_htmlareafields());
}
if ($target eq 'web') {
$result.= &Apache::loncommon::end_page({'discussion' => 1});
@@ -2057,17 +2055,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);
|