Sounds like you want to do a "Pre-quiz" before the student takes a course.
That can be easily done but using Restrict Access on the quiz activity that the student cannot continue to the next course activity. You can set your restriction conditions on the quiz activity for scores, grades, or even that they just took the quiz.