I would like to calculate the total marks of the questions, parts, and subparts based on their children's.
\documentclass[addpoints,answers,10pt]{exam}
\marksnotpoints
\marginpointname{ marks}
\pointformat{(\themarginpoints)\hspace{2mm}}
\pointsinmargin
\begin{document}
\begin{questions}
\question[7] marks should be calculated here
\begin{parts}
\part[2] ...
\part[5] marks should be calculated here
\begin{subparts}
\subpart[2] ....
\subpart[3] marks should be calculated here
\begin{subsubparts}
\subsubpart[1] f
\subsubpart[2] k
\end{subsubparts}
\end{subparts}
\end{parts}
\end{questions}
\end{document}
After being able to calculate the question total marks, I would like to redesign the question label to include the calculated marks and be like
Question (1) [7 Marks]
while left-aligning it with the question body without going through the left margin.