Make button appear only if coming from a certain slide
I'm working on a project which is separated into two parts. The first one lets the user to read information about grammar, the second part is a quiz which checks the user's grammatical knowledge.
At the bottom of each quiz slide, I've added a smart shape which acts as a button. That button allows the user to go back to a certain slide of the information part which explains the grammatical feature asked in the quiz.
So for example:
Slide 50 is a Quiz question which asks the user to identify the subject of a given sentence. At the bottom of the slide, there is a "Back to the information part about subjects" button. The button is linked to Slide 22 which explains subjects. Now, on that slide, I would like to have another button which allows the user to go back to Slide 50. That button, however, only needs to appear when coming from the quiz and not when going through the entire captivate project in the right order.
How can I achieve that?
Thank you for your help!