--- loncom/homework/default_homework.lcpm 2001/07/11 21:36:29 1.29 +++ loncom/homework/default_homework.lcpm 2001/07/13 14:49:28 1.30 @@ -82,11 +82,13 @@ sub caparesponse_check { sub caparesponse_check_list { my ($response,$expr)=@_; + # do these first, because who knows what varname the instructor might have used + # but it probably isn't $CAPARESPONSE_CHECK_LIST_answer + my $CAPARESPONSE_CHECK_LIST_answer = eval $expr.';return $answer'; + my (@list) = eval $CAPARESPONSE_CHECK_LIST_answer; my $result=''; my $aresult=''; my $current_answer; - my $answer = eval $expr.';return $answer'; - my (@list) = eval $answer; my (@responselist)=split /,/,$response; my $unit=''; $result.="Final response :$responselist['-1']:
";