Ed, you probably want to try the quiz module for this rather than the assignment module. At York we are using our own module for the integration between AiM and Moodle. This is not publicly available. One piece of quiz software that you may want to use for mathematics questions is STACK. This will be made available within the quiz module in the future.