exercise-gen - make one query for all questions

Fix the exercise generation for non-root practice exercises.
This one made sense, understandable to keep this as is.