def METHOD_NAME(quiz_name):
	if frappe.session.user == "Guest":
		return " <div class='alert alert-info'>" + _(
			"Quiz is not available to Guest users. Please login to continue."
		)
		+"</div>"
	quiz = frappe.get_doc("LMS Quiz", quiz_name)
	no_of_attempts = frappe.db.count(
		"LMS Quiz Submission", {"owner": frappe.session.user, "quiz": quiz_name}
	)
	if quiz.show_submission_history:
		all_submissions = frappe.get_all(
			"LMS Quiz Submission",
			{
				"quiz": quiz.name,
				"member": frappe.session.user,
			},
			["name", "score", "creation"],
			order_by="creation desc",
		)
	return frappe.render_template(
		"templates/quiz/quiz.html",
		{
			"quiz": quiz,
			"no_of_attempts": no_of_attempts,
			"all_submissions": all_submissions if quiz.show_submission_history else None,
			"hide_quiz": False,
		},
	)