I am trying to customize the question environment of exam.cls
. I want to have a command like \printquestions
to hide/unhide the questions, while retaining the points and question labels.
I have used environ
package to create an enviroment around each question content to do this.
\newif\ifkeepquestion \keepquestiontrue
\NewEnviron{qsn}{\ifkeepquestion\BODY\fi}
\begin{document}
\begin{questions}
\pointsdroppedatright
%1
\question[10]
\begin{qsn}
Describe the effect on the balloon industry.
\end{qsn}
\droppoints
\end{questions}
\end{document}
Is there is any direct way to hide the content "Describe the effect on the balloon industry." inside the exam.cls
, rather than relying on Environ
package.
I tried to look into the \newenvironment{questions}
of exam.cls
file, where it uses \list
command and \item
to create the content. Can we modify the \item definition to either hide or unhide the content, based on \ifkeepquestion