Hi Philip!
This is in answer to your queries regarding correct answer analysis of student responses entered in the short answer exercise type of the Lesson module.
The correct way to match complex reponses to a short answer question is to use regular expressions. Mastering regular expressions is not so easy, but once you understand them they are a very powerful tool for answer analysis (which is what you are after).
Unfortunately, at the moment regular expressions are not implemented in the lesson module (nor in the Quiz module).
I have developed a working version of the lesson.php module which includes regular expressions and sent it to Ray some time in July. Ray, are you still interested in incorporating regular expressions into the Lesson Module ?
In the meantime, Philip, if you want to test the "power" of regular expressions, you can go to my testing page: http://rezeau.org/webCT/expandRegexpToString.htm
in the regExp box enter: int\s*\[\] dataArray\s*=\s*new int\s*\[\s*total\s*\]
in the String box, enter: int [] dataArray = new int [total]
Finally, the answer to your question of allowing any number of spaces (and no other characters) is dealt with by the \s* string in the REgular Expression to be matched (\s = ny single white-space character ; * = the preceding character 0 or infinite number of times)
Hope that helps,
Joseph_R