[LON-CAPA-users] submission masaging

Bob Gonzales lon-capa-users@mail.lon-capa.org
Thu, 17 Jul 2008 14:35:58 -0400


What kind of massaging does LONCAPA do
to the string of text that is entered 
for an answer?

I ran into a situation where a student entered 
the number 1.1e-7 as 1.1  e-7.  LONCAPA took out 
the spaces before it checked the answer and then 
marked the problem correct.  I then grabbed the 
submission (via &EXT) and assigned it to a variable 
and then used the variable in a calculation, without 
removing spaces (who would have thought...) and got 
an answer I didn't expect.  Interestingly,  LONCAPA 
used the mantissa (the 1.1 part) in the calculation and
ignored the rest of the submission.

So, I guess I need to massage the submission
the same way LONCAPA does in order to avoid
this situation in the future.

Thanks,
Bob Gonzales
Chemistry Dept
Binghamton University