Thank you for your advice!
I've tried the plugin and i will use it if I will not find another way.
I've to create a new plugin. I try to explain step by step.
I have cloned the "topics format" and replaced all occurrences of "topics". I zipped and loaded it, and moodle recognizes it.
At the moment in the format selection menu I have one more option (which is actually identical to "Topics format" but with a different name).
Now I'd like to modify the sourse code for creating a quiz automatically on crourse creation (like "Announcements" activity). But I do not know how to do it.
Others step when I will complete the step 2