I use an LMS plugin called LearnDash. They are currently developing a plugin that will do just that and will be available in LearnDash PLUS when it is released. I have been scouring the web for this capability so I am grateful that it will soon be here. Feel free to e-mail me at simsketch at gmail.com and I will give you an update on the status if you’re interested.