Whenever a solution is not provided, XSIM is repeating the statement of the exercise as its solution. This only happens for custom exercise types. In the example below, it should not show the "hint for task 2".
\documentclass{article}
\usepackage{xsim}
\DeclareExerciseType{task}{
exercise-env = task ,
solution-env = taskhint ,
exercise-name = Task ,
solution-name = Hint for task ,
exercise-template = default ,
solution-template = default
}
\begin{document}
\section*{Tasks}
\begin{task}
Statement of task 1.
\end{task}
\begin{taskhint}
Hint for task 1.
\end{taskhint}
\begin{task}
Statement of task 2.
\end{task}
\begin{task}
Statement of task 3.
\end{task}
\begin{taskhint}
Hint for task 3.
\end{taskhint}
\section*{Hints}
\printallsolutions
\end{document}
xsim.sty 2022/02/12 v0.21