i want to get answer key at the end of each chapter. but when i give the following code it show all the previous chapter answer at end of each chapter.
\newcommand*\getanswers{%
\def\betweenanswers{\def\betweenanswers{\hspace{2em}}}%
\ForEachUsedExerciseByID{%
\betweenanswers##3\ExercisePropertyGet{##1}{##2}{answer}%
}%
}
\newcommand*{\displaycurrentchapter}{%
Chapter number: \thechapter \ExercisePropertyGet{type}{id}{property}
}
please help..