\documentclass[a4paper,12pt,addpoints]{exam}
\begin{document}
\begin{questions}
\begingradingrange{section1}
\question[10] Here is my first question worth 10 points\\
The number of points in section one are \pointsinrange{section1}
\endgradingrange{section1}
\end{questions}
\begin{questions}
\begingradingrange{section2}
\question[25]%
Here is my second question worth 25
\endgradingrange{section2}
\end{questions}
\end{document}
Output
- (10 points) Here is my first question worth 10 points The number of points in section one are 25
- (25 points) Here is my second question worth 25
Question why does \pointsinrange{section1} return 25 rather than 10?