Affects Version/s: 1.8.1
Fix Version/s: 1.9
Environment:When attempting a quiz where the user is logged in but not enrolled on the course that allows in guests.
If a user is logged but not enrolled in a course that allows in guests. If they try to take a quiz they are presented with a screen that tells them how the quiz is graded but no more information. What is needed seems to be some code that prompts them to enroll in the course. I have some general code that seems to add this functionality into the mod\quiz\view.php module.
If the following code is added just above the comment that says
//Guests can't do a quiz, so offer them a choice of logging in or going back
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
print "<h3> You need to be enrolled to make quiz attempts </h3>";
print "<a href=".$CFG->wwwroot."/course/enrol.php?id=".$course->id .">Click here to enrol </a>";