Two years ago I found this solution for including footnotes in the solution environment of the exam package:
https://tex.stackexchange.com/a/392622/96422
This answer propose to use the footnote package, and it works perfectly, but it has a problem: when the answer option is removed, the footnote still appears in the document, as you can see modifying the same example given in the referenced answer:
\documentclass[12pt]{exam}
\usepackage{footnote}
\makesavenoteenv{solution}
\begin{document}
\begin{questions}
\question
Some question
\begin{solution}
Text\footnote{Some footnote that must not appear when answers option is
removed}
\end{solution}
\end{questions}
\end{document}
That means that you have to comment out each footnote to set up an exam without solutions. I would like the footnotes in the solutions to only show when answers options is given.
