--- loncom/homework/structuretags.pm 2007/08/10 11:35:57 1.388 +++ loncom/homework/structuretags.pm 2007/08/14 04:29:37 1.390 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.388 2007/08/10 11:35:57 foxr Exp $ +# $Id: structuretags.pm,v 1.390 2007/08/14 04:29:37 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -644,7 +644,6 @@ sub start_problem { } if ($target ne 'analyze') { - if ($env{'request.state'} eq 'construct') { &set_problem_state('0'); } $Apache::lonhomework::type=&Apache::lonnet::EXT('resource.0.type'); if (($env{'request.state'} eq 'construct') && defined($env{'form.problemtype'})) { @@ -665,6 +664,11 @@ sub start_problem { $Apache::lonhomework::default_type = $Apache::lonhomework::type; &initialize_storage(); + if ($target ne 'analyze' + && $env{'request.state'} eq 'construct') { + &set_problem_state('0'); + } + if ($target eq 'web') { &Apache::lonxml::debug(" grading history "); &Apache::lonhomework::showhash(%Apache::lonhomework::history);