by Marc Grober.
read docs on texdebug - your problem is not with dragmath but with tex.
in fact read the old docs on math tools so you get the gist on the differences
I would recommend you do an install of texLive
here is a place for you to start your research on having a working local install for tex under Ubuntu https://help.ubuntu.com/community/LaTeX
the tex filer in moodle is ancient and current tex renders the non-Tex binary required by the filter unnecessary, but you have to hack the filter to bypass it.
As a result, unless you are planning to do some very heavy TeX that mathjax can't support, I suggest you pass on the Moodle Tex filter, turn it off, and reference both Mathjax and jsxgraph/geogebra in you additionalhtml