One of the shortcomings of the H5P plugins currently is, that they do not allow to display user scores in posts or pages. Users will have to log in to the backend. Log in? Yes, some other shortcoming is that scores are only saved when students are signed in to the host system. But …
You knew there was going to be a ‘but’, didn’t you?
But the university of Freiburg in Germany took the initiative and let me develop a WordPress plugin that closes this gap.
H5P User Score
The plugin was named H5P User Score and adds several shortcodes that you can put into posts and pages, and those will be replaced by the user’s previous score (absolute and a percentage) and the maximum score of an H5P content type.
Let’s say you have an H5P multiple choice quiz with ID 17 available for your site’s users. Assume the current user scored 5 points while the maximum possible score is 10 points.
On any page or post (not limited to those where the H5P interaction is available), you could e.g. write:
In the multiple choice quiz, you scored [h5pScore value=”score” id=”17″] points out of [h5pScore value=”max” id=”17″]. That’s [h5pScore value=”percentage” id=”17″] percent!
On the page or post, this would render as
In the multiple choice quiz, you scored 5 points out of 10. That’s 50 percent!
In contrast to common scoring, users won’t have to be signed in to WordPress. Their scores will be kept in the browser’s local storage, so as long as users don’t use a different device, they’ll be able to see their previous scores.
How to get it?
Unfortunaly, you will not find this plugin in the official WordPress plugin repository. The university of Freiburg cannot guarantee support and neither can I for yet another piece of software that I created as a contractor. Since there’s no support, the WordPress team won’t list the plugin. But … Here’s a ‘but’ again … But the source code is openly licensed and published, and you can download the plugin from github and install it yourself by uploading.