edx/edx-platform — pull request #726 by pbaratta (2013-08-19 05:09:15+00:00)
Title: Use calc's evaluator for staff answers in `Numercial` type

Changes
----
* Simply modify the way `NumericalResponse` handles its `answer` attribute, and turns it into a number, which is compared with the student's answer.

Instructors were confused about not being able to set the answer to '1/3'. This fixes that, while also giving access to simple math/scientific constants (`pi`, `e`, etc).

In `capa/responsetypes.py:NumericalResponse`, we make a call to `complex(...)` to convert the staff answers. If that fails, try to use `calc.evaluator(...)`.

Reviewers
---
* @vaxXxa would you mind looking at this or tagging someone?
* @sarina