--- loncom/homework/structuretags.pm 2008/05/27 19:48:55 1.420 +++ loncom/homework/structuretags.pm 2008/07/08 09:54:30 1.424 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.420 2008/05/27 19:48:55 www Exp $ +# $Id: structuretags.pm,v 1.424 2008/07/08 09:54:30 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -312,24 +312,28 @@ sub remember_problem_state { '; } -sub problem_edit_header { - return ''. - &Apache::structuretags::remember_problem_state().' -
-
-'.&mt('Problem Editing').&Apache::loncommon::help_open_menu('Problem Editing','Problem_Editor_XML_Index',5,'Authoring').' -
+sub problem_edit_buttons { + return '
- + ' onclick="javscript:setmode(this.form,'."'discard'".')" />
-
+
'; +} + +sub problem_edit_header { + return ''. + &Apache::structuretags::remember_problem_state().' +
+
+'.&mt('Problem Editing').&Apache::loncommon::help_open_menu('Problem Editing','Problem_Editor_XML_Index',5,'Authoring').' +
'. +&problem_edit_buttons().'
'.&Apache::lonxml::message_location().'
@@ -340,17 +344,8 @@ sub problem_edit_header { sub problem_edit_footer { return '
'. @@ -451,28 +446,15 @@ $show_all $show_all "; } - if (($env{'form.problemlanguage'}) && ($env{'form.problemlanguage'}!~/notset/)) { - $env{'environment.languages'}=$env{'form.problemlanguage'}; - } - my %langchoices=('' => ''); - foreach (&Apache::loncommon::languageids()) { - if (&Apache::loncommon::supportedlanguagecode($_)) { - $langchoices{&Apache::loncommon::supportedlanguagecode($_)} - = &Apache::loncommon::plainlanguagedescription($_); - } - } $result.=' '.&mt('Apply style file: ').' &').'" /> '.&mt('Select').' -
- '. - &mt('Language: '). - &Apache::loncommon::select_form($env{'environment.languages'},'problemlanguage', - %langchoices).' - +
+
'. + &Apache::lonxml::renderingoptions().'
@@ -1888,6 +1870,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:'). @@ -1895,7 +1878,9 @@ sub end_startouttext { ." ". &Apache::edit::insertlist($target,$token). - '' . + ''. + &Apache::lonhtmlcommon::dragmath($areaid).''. + '' . &Apache::loncommon::helpLatexCheatsheet(). &Apache::edit::end_row(). &Apache::edit::start_spanning_row()."\n".