Moodle has an "algebra filter" which can display mathematical expressions as if they were typeset. The filter is included in the standard Moodle packages but the administrator must activate it before you can use it and it requires that the Moodle Tex filter also be working as the algebra filter simply parses math expressions in one syntax and then converts the expressions to LaTex expressions for the Tex filter to render and display.
Unfortunately, though implementation of Tex for Moodle Docs has been demonstrated (see e.g. https://docs.moodle.org/test/Development:MediaWiki_TeX_test) that functionality has yet to be addressed in the production version of moodle docs.
More to the point, while it has been argued that the algebra filter is easy to use, there is apparently no Moodle reference on its "grammar" or "syntax". See http://moodle.org/mod/forum/discuss.php?d=126522&parent=554632 for links to an explanation of this notation from the Webworks site.
Unfortunately, the advent of the TeX notation seems to have swamped the Algebra Notation. Very little discussion or resources have been devoted to this filter, and a lot more has been directed at TeX Notation.