When it was asked/when I had/when I had to produce a written argument on a given topic/theme.
When I had to elaborate/discuss on a given theme/topic.
Some people stick to the academic lingo, so they make a distinction between theme (narrower) and topic (more general, widen term). Some don´t. But I will leave it to you the homework to do, searching the far corners of Google/yahoo and other search engines.
An example taken from an IELTS site elsewhere:
The second task is more demanding. You are expected to produce a written argument on a given topic and to organise your answer clearly, given some examples to support your points.