The following is the equation appears when I try to execute in normal edit mode

$$\begin{align}\left({\frac{{\partial \ln Q\left( {N,V,\beta } \right)}}{{\partial \beta }}} \right)_{N,V}\quad &= \frac{1}{{Q\left( {N,V,\beta } \right)}}\left( {\frac{{\partial \sum {e^{ - \beta E_j \left( {N,V} \right)}}}}{{\partial \beta }}} \right)_{N,V} \ &= \frac{1}{{Q\left( {N,V,\beta } \right)}}\sum\limits_j {\left[ { - E_j \left( {N,V} \right)} \right]e^{ - \beta E_j \left( {N,V} \right)} } \ &= - \sum\limits_j {\frac{{E_j \left( {N,V} \right)e^{ - \beta E_j \left( {N,V} \right)} }}{{Q\left( {N,V,\beta } \right)}}} \ \end{align}$$

and this is the appearance when enter the same equation in html source edit mode

$$\begin{align}\left({\frac{{\partial \ln Q\left( {N,V,\beta } \right)}}{{\partial \beta }}} \right)_{N,V}\quad &= \frac{1}{{Q\left( {N,V,\beta } \right)}}\left( {\frac{{\partial \sum {e^{ - \beta E_j \left( {N,V} \right)}}}}{{\partial \beta }}} \right)_{N,V} \\ &= \frac{1}{{Q\left( {N,V,\beta } \right)}}\sum\limits_j {\left[ { - E_j \left( {N,V} \right)} \right]e^{ - \beta E_j \left( {N,V} \right)} } \\ &= - \sum\limits_j {\frac{{E_j \left( {N,V} \right)e^{ - \beta E_j \left( {N,V} \right)} }}{{Q\left( {N,V,\beta } \right)}}} \\ \end{align}$$

and this is what it appears using mimetex.cgi from my server

Is the tex filter in moodle is different from that of 'forkosh'