--- loncom/homework/structuretags.pm 2008/02/08 18:01:30 1.418
+++ loncom/homework/structuretags.pm 2008/07/28 05:26:00 1.425
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.418 2008/02/08 18:01:30 bisitz Exp $
+# $Id: structuretags.pm,v 1.425 2008/07/28 05:26:00 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -148,6 +148,10 @@ sub page_start {
$extra_head .= &homework_js();
+ unless ($env{'environment.wysiwygeditor'} eq 'on') {
+ $extra_head .= &Apache::lonhtmlcommon::dragmath_js();
+ }
+
my %body_args;
if (defined($found{'html'})) {
$body_args{'skip_phases'}{'head'}=1;
@@ -312,24 +316,28 @@ sub remember_problem_state {
';
}
-sub problem_edit_header {
- return ''.
- &Apache::structuretags::remember_problem_state().'
-
';
+}
+
+sub problem_edit_header {
+ return ''.
+ &Apache::structuretags::remember_problem_state().'
+
@@ -340,17 +348,8 @@ sub problem_edit_header {
sub problem_edit_footer {
return '
'.
@@ -451,7 +450,6 @@ $show_all
$show_all
";
}
-
$result.='
'.&mt('Apply style file: ').'
@@ -459,6 +457,9 @@ $show_all
'.&mt('Select').'
+
@@ -477,8 +478,8 @@ $show_all
$result .= ''.
&mt('[_1] for [_2] versions.',
'
- '
+ ,'').
&Apache::loncommon::help_open_topic("Analyze_Problem",'',undef,undef,300).
'';
@@ -1873,6 +1874,7 @@ sub end_startouttext {
my $text='';
if ($target eq 'edit') {
+ my $areaid = 'homework_edit_'.$Apache::lonxml::curdepth;
$text=&Apache::lonxml::get_all_text("endouttext",$parser,$style);
$result.=&Apache::edit::start_table($token)."".&mt('Text Block')." |
".&mt('Delete:').
@@ -1880,7 +1882,13 @@ sub end_startouttext {
." |
".
&Apache::edit::insertlist($target,$token).
- ' | ' .
+ ' | ';
+ unless ($env{'environment.wysiwygeditor'} eq 'on') {
+ $result.=''
+ .&Apache::lonhtmlcommon::dragmath_button($areaid,1)
+ .' | ';
+ }
+ $result.='' .
&Apache::loncommon::helpLatexCheatsheet().
&Apache::edit::end_row().
&Apache::edit::start_spanning_row()."\n".
|