--- loncom/homework/structuretags.pm 2007/10/30 00:17:09 1.407 +++ loncom/homework/structuretags.pm 2007/11/13 23:33:01 1.413 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.407 2007/10/30 00:17:09 albertel Exp $ +# $Id: structuretags.pm,v 1.413 2007/11/13 23:33:01 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -199,7 +199,7 @@ sub page_start { } } - if (!defined($found{'body'})) { + if (!defined($found{'body'}) && $env{'request.state'} ne 'construct') { $page_start .= &Apache::lonxml::message_location(); } @@ -302,22 +302,44 @@ 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').' +
+
-
- - -
'. - &Apache::loncommon::help_open_menu('Problem Editing Help','Problem_Editor_XML_Index',5,'Authoring',undef,undef,undef,'Problem Editing Help') - .'
'. +
+
+ + +
+
+'.&Apache::lonxml::message_location().' +
+'. '
'; } sub problem_edit_footer { - return '

- '. + return '
+ +'. + &Apache::lonhtmlcommon::htmlareaselectactive(&Apache::lonhtmlcommon::get_htmlareafields()). "\n\n".&Apache::loncommon::end_page(); } @@ -336,12 +358,6 @@ sub problem_web_to_edit_header { my ($rndseed)=@_; my $result .= '
'; - $result.='
'; - $result.=''; - $result .= ''; - $result .= ''; - $result.='
'; - if (!$Apache::lonhomework::parsing_a_task) { $result .= '
'. @@ -443,17 +459,25 @@ $show_all if (!$Apache::lonhomework::parsing_a_task) { my $numtoanalyze=$env{'form.numtoanalyze'}; if (!$numtoanalyze) { $numtoanalyze=20; } - $result .= &mt('[_1] for [_2] versions of this problem.', - '', - ''). - &Apache::loncommon::help_open_topic("Analyze_Problem", - '',undef,undef,300); + $result .= ''. + &mt('[_1] for [_2] versions.', + '', + ''). + &Apache::loncommon::help_open_topic("Analyze_Problem",'',undef,undef,300). + ''; + } $result.='
-
+
'; + $result.=''; + $result .= ''; + $result .= ''; + $result.=' +
+ '.&Apache::lonxml::message_location().'
'; return $result; } @@ -713,7 +737,7 @@ sub start_problem { if ($target ne 'analyze') { $Apache::lonhomework::type=&Apache::lonnet::EXT('resource.0.type'); if (($env{'request.state'} eq 'construct') && - defined($env{'form.problemtype'})) { + $env{'form.problemtype'} =~ /\S/) { $Apache::lonhomework::type=$env{'form.problemtype'}; } &Apache::lonxml::debug("Found this to be of type :$Apache::lonhomework::type:");