Teaching statistics or data science, we can use learnr package.
# library("learnr")
To collect data, we can use learnrhash
# library("learnrhash")
Remember to adjust parameters so your Shinyapp.io can handle the number of students you have in the class.