Here you go: How to keep exercise and solution together in source, but render them separately? - #3 by Andrew.