--- loncom/homework/structuretags.pm 2007/10/17 00:22:51 1.405
+++ 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.405 2007/10/17 00:22:51 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,20 +302,44 @@ sub remember_problem_state {
sub problem_edit_header {
return ' '.
&Apache::structuretags::remember_problem_state().'
+
+'.
'';
}
sub problem_edit_footer {
- return '
- '.
+ return '
+
+'.
+
&Apache::lonhtmlcommon::htmlareaselectactive(&Apache::lonhtmlcommon::get_htmlareafields()).
"\n\n".&Apache::loncommon::end_page();
}
@@ -332,34 +356,37 @@ sub option {
sub problem_web_to_edit_header {
my ($rndseed)=@_;
- my $result.=' ';
- $result .= ' ';
- $result .= '
-
-
-
-
- '.
+ &mt('Problem Testing').
+ &Apache::loncommon::help_open_topic('Problem_Editor_Testing_Area').
+ '';
+ } else {
+ $result .=
+ '';
+ }
+
my $show_all_foils_text =
($Apache::lonhomework::parsing_a_task) ?
&mt(' Show All Instances')
: &mt(' Show All Foils');
- if (defined($env{'form.showallfoils'})) { $result.='checked="on"'; }
- $result.= ' />'.$show_all_foils_text.' '.
- &Apache::loncommon::help_open_topic('Problem_Editor_Testing_Area','Testing Problems').
- ' ';
- $result.=&mt('Apply style file: ').'
- &').'" />
- '.&mt('Select').'
-
- ';
+ my $show_all= ' '.$show_all_foils_text.' ';
+
+
+ $result .= '';
return $result;
}
@@ -672,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:");