Hello,
Looking at my code (after more than 2 years away from Moodle) it seems I forgot to close a recordset after use in at least 2 places in my code for the qcreate tasks.
Sorry I will release a new version correcting this.
But please note that because of my retirement I can't say that there are not other problems in this activity module with Moodle recent versions and I can't certify that I will find time to correct other problems, if some are found, but as this an evident mistake (my bad) and I easy fix, I would be stupid not to fix it.