--- loncom/homework/structuretags.pm 2008/05/27 22:25:56 1.421
+++ loncom/homework/structuretags.pm 2008/08/04 22:42:11 1.426
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.421 2008/05/27 22:25:56 www Exp $
+# $Id: structuretags.pm,v 1.426 2008/08/04 22:42:11 felicia 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,33 +450,15 @@ $show_all
$show_all
";
}
- my %langchoices=('' => '');
- foreach (&Apache::loncommon::languageids()) {
- if (&Apache::loncommon::supportedlanguagecode($_)) {
- $langchoices{&Apache::loncommon::supportedlanguagecode($_)}
- = &Apache::loncommon::plainlanguagedescription($_);
- }
- }
$result.='
'.&mt('Apply style file: ').'
&').'" />
'.&mt('Select').'
-
+
@@ -1893,14 +1874,18 @@ 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:').
&Apache::edit::deletelist($target,$token)
- ." |
-".
- &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".
|