Hello there. I am not sure this can be done automatically yet. Your idea of providing the enrolment key for the next course if they get a certain grade in the test is a good one and the way I would use. It will be good to see which solutions others have.
Teaching with Moodle
Use testresult to automatically enroll
This discussion has been locked so you can no longer reply to it.