--- loncom/homework/functionplotresponse.pm 2011/10/13 01:54:12 1.65 +++ loncom/homework/functionplotresponse.pm 2011/10/19 00:20:28 1.67 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: functionplotresponse.pm,v 1.65 2011/10/13 01:54:12 www Exp $ +# $Id: functionplotresponse.pm,v 1.67 2011/10/19 00:20:28 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -973,6 +973,7 @@ sub compare_rel { sub addlog { my ($text)=@_; + $text=~s/\'/\\\'/g; $Apache::functionplotresponse::ruleslog.=$text.'
'; } @@ -981,6 +982,13 @@ sub actualval { return $xmin+$i/400.*($xmax-$xmin); } +sub fpr_val { + my ($arg)=@_; + return &actualval($Apache::functionplotresponse::functionplotrulelabels{$arg}, + $Apache::functionplotresponse::fpr_xmin, + $Apache::functionplotresponse::fpr_xmax); +} + sub fpr_f { my ($arg)=@_; return $Apache::functionplotresponse::func[&array_index($Apache::functionplotresponse::fpr_xmin,