--- loncom/homework/structuretags.pm 2002/12/05 22:59:37 1.142 +++ loncom/homework/structuretags.pm 2003/03/14 23:27:19 1.144.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.142 2002/12/05 22:59:37 albertel Exp $ +# $Id: structuretags.pm,v 1.144.2.1 2003/03/14 23:27:19 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -122,7 +122,6 @@ sub page_start { sub get_resource_name { my ($parstack,$safeeval)=@_; my $name=&Apache::lonnet::gettitle(); - &Apache::lonnet::logthis("Got $name"); if ($name eq '') { $name=&Apache::lonnet::EXT('resource.title'); if ($name eq 'con_lost') { $name = ''; } @@ -253,6 +252,7 @@ sub start_problem { $Apache::inputtags::part='0'; @Apache::inputtags::responselist = (); @Apache::inputtags::previous=(); + @Apache::inputtags::previous_version=(); if ($target ne 'analyze') { &initialize_storage(); if ($target eq 'web') { @@ -412,7 +412,7 @@ sub end_problem { my $result=''; my $status=$Apache::inputtags::status['-1']; if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || $target eq 'tex') { - if ( $target eq 'grade' && $Apache::inputtags::part eq '0') { + if ( $target eq 'grade' && $Apache::inputtags::part eq '0' && $status eq 'CAN_ANSWER' ) { # if part is zero, no s existed, so we need to the grading &Apache::inputtags::grade; } elsif ( ($target eq 'web' || $target eq 'tex') && $Apache::inputtags::part eq '0' && @@ -662,6 +662,7 @@ sub start_part { $Apache::inputtags::part=$id; @Apache::inputtags::responselist = (); @Apache::inputtags::previous=(); + @Apache::inputtags::previous_version=(); if ($target eq 'meta') { return &Apache::response::mandatory_part_meta; } elsif ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') {