My code is below, and the error I got is details:
Package tikz Error: Sorry, the system call
'pdflatex -halt-on-error -interact ion=batchmode -jobname "Midterm-tikztemp-1" "\def\tikzexternalrealjob{Midterm}\input{Midterm}"'did NOT result in a usable output file 'Midterm-tikztemp-1' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that.
and I got the error in the picture when I add --enable-write18, also when I used terminal it didn't work as shown in the picture as well.
I still couldn't figure out how to solve the problem.
\documentclass[12pt]{article}
\usepackage{amsmath,amsthm, amssymb, latexsym}
\usepackage{tikz}
\makeatletter
\renewcommand*\env@matrix[1][c]{\hskip -\arraycolsep
\let\@ifnextchar\new@ifnextchar
\array{*\c@MaxMatrixCols #1}}
\makeatother
\usepackage{moodle}
\usetikzlibrary{external} % set this
\tikzexternalize % explicitly
\usepackage{graphicx}
\begin{document}
\begin{quiz}{Revisiting Linear Algebra}
\begin{multi}[points=2]{Matrix Form of a Linear System}
Consider the following system
\begin{tikzpicture} % matrix inside of tikzpicture node
\node{
$\begin{matrix}[r]
3.0 x_1 &+2.0 x_2 &+2.0 x_3 & -5.0 x_4 & =8 .0 \
0.6 x_1 &+ 1.5 x_2 &+1.5 x_3 & -5.4 x_4 & =2.7 \
1.2 x_1 & -0.3 x_2 & -0.3 x_3 & 2.4 x_4 & =2.1 , \
\end{matrix}
$};
\end{tikzpicture}
which may be written as a single vector equation; i.e, $\mathbf{AB}=\mathbf{B}$.\
The $\mathbf{A}$ matrix associated with the system is:
\end{multi}
\end{quiz}
\end{document}

tikzexternalize. This feature does only work if LaTeX is able to execute other commands during the process of compiling your document, in this case generating the PDF that should be externalized and include it as an external source. You have to look at how you can enableshell-escapein your software. "Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that." – Sam Oct 20 '20 at 15:28