Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
sensei_user_quiz_grade happens before Sensei()->quiz->set_user_grades() #2385
Steps to Reproduce
What I Expected
It would be great to access the users question grades in the email templates.
What Happened Instead
The question grades are all unset because emails are sent before the users question grade data is stored.
My current use case only has one course/lesson/quiz so I can get away with moving the emails from 'sensei_user_quiz_grade' and 'sensei_course_status_updated' hooks to be on 'sensei_user_quiz_submitted' with some messy tweaking. By the time 'sensei_user_quiz_submitted' fires I have access to the quiz answers.
But to me, it would make more sense to have the users answered saved to the database before we trigger the email for `learner_graded_quiz.