--- loncom/homework/response.pm 2004/11/06 21:30:35 1.105.2.1 +++ loncom/homework/response.pm 2004/11/08 19:20:13 1.109 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # various response type definitons response definition # -# $Id: response.pm,v 1.105.2.1 2004/11/06 21:30:35 albertel Exp $ +# $Id: response.pm,v 1.109 2004/11/08 19:20:13 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -273,10 +273,11 @@ sub handle_previous { if ($$previous{'used'} && ($$previous{'award'} eq $ad) ) { if ($$previous{'last'}) { push(@Apache::inputtags::previous,'PREVIOUSLY_LAST'); - } else { + push(@Apache::inputtags::previous_version,$$previous{'version'}); + } elsif ($Apache::lonhomework::type ne 'survey') { push(@Apache::inputtags::previous,'PREVIOUSLY_USED'); + push(@Apache::inputtags::previous_version,$$previous{'version'}); } - push(@Apache::inputtags::previous_version,$$previous{'version'}); } } @@ -512,6 +513,7 @@ sub showallfoils { return 1; } } + if ($Apache::lonhomework::type eq 'survey') { return 1; } return 0; } @@ -651,7 +653,7 @@ sub analyze_store_foilgroup { sub check_if_computed { my ($token,$parstack,$safeeval,$name)=@_; my $value = &Apache::lonxml::get_param($name,$parstack,$safeeval); - if ($value ne $token->[2]{$name}) { + if (ref($token->[2]) eq 'HASH' && $value ne $token->[2]{$name}) { my $part_id="$Apache::inputtags::part.$Apache::inputtags::response[-1]"; $Apache::lonhomework::analyze{"$part_id.answercomputed"} = 1; }