PREP 2014 Question Authoring - Archived

Problems with highlighting and ans_array

Problems with highlighting and ans_array

by Mike Daven -
Number of replies: 1

I am finding a weird (?) behavior when using points and ans_array – at least part of the answer is not always highlighting correctly. 

Here's a small example: 

$beta = random(1,9,1); 
$g = random(-9,9,1); 
$h = random(-9,9,1); 
$x = Compute(" ($g - $beta + 1)/($beta) ")->reduce; 
$y = Compute(" ($h - $beta + 1)/$beta ")->reduce; 
$P = Point($x,$y); 

If \($beta\odot(x,y)=($g,$h)\), then \((x,y)\) = \{$P->ans_array(1)\} 


For each part of the problem, the answer is an ordered pair “(x,y)” and you need to find the values for “x” and “y”.  I wanted the answer to be entered one coordinate at a time, not as a point, but the correct answer should be displayed as a point. I liked what I saw at the wiki: 

Everything works as planned except the way the answer is displayed -- the first answer box is highlighted correctly depending on the answer, the second answer box doesn’t highlight either way.  The message reports correctly if one or both coordinates is incorrect. 

Any thoughts? 

In reply to Mike Daven

Re: Problems with highlighting and ans_array

by Davide Cervone -
This is a known issue with the coloring of answer blanks (I mentioned this in the talk on Monday). For now you will have to accept that until the MathObject library is updated to account for the coloring of the additional answer blanks.