I noticed what appears to be a bug where admins of a WordPress site are unable to check the results of the H5P quizzes. Instead of showing the results a message is displayed. The message says "There are no logged results for this content" even though the results are saved in the database.
Unfortunately I was unable to reproduce the bug consistently, so I'm writing here in the hopes that somebody will be able to help.
Steps to Reproduce:
Navigate to the "All H5P Content" section in the WordPress admin dashboard (wp-admin/admin.php?page=h5p)
Click on results.
Expected Behavior:
If the selected content has results saved in the database, they should appear here like so:
Actual Behavior:
Sometimes even if the results exist, they do not get displayed. Instead a message is shown (There are no logged results for this content.) This happens for all the content, not just one quiz.
I noticed that the Ajax request is returning empty rows (/wp-admin/admin-ajax.php?action=h5p_content_results&id=4):
I checked the database and in this case the results table does have 5 results for this content id. You can see in the picture above that 5 rows have indeed been found. However, an empty array is returned instead of the actual results.
Additional Information:
Like I said the error seems to be inconsistent. Sometimes I am able to reproduce it sometimes not. The only thing I can say for sure is that the "bug" appears only on versions >= 1.15.7. Version 1.15.6 and bellow never have this problem.
I also noticed that when the bug appears, the users are still able to see their results under the My Results submenu (wp-admin/admin.php?page=h5p_results). I'm not sure what would cause such behavior. I ruled out plugin conflicts.
Description:
I noticed what appears to be a bug where admins of a WordPress site are unable to check the results of the H5P quizzes. Instead of showing the results a message is displayed. The message says "There are no logged results for this content" even though the results are saved in the database.
Unfortunately I was unable to reproduce the bug consistently, so I'm writing here in the hopes that somebody will be able to help.
Steps to Reproduce:
Expected Behavior:
If the selected content has results saved in the database, they should appear here like so:
Actual Behavior:
Sometimes even if the results exist, they do not get displayed. Instead a message is shown (There are no logged results for this content.) This happens for all the content, not just one quiz.
Troubleshooting
In the settings logging of results is enabled:
The results do get saved to the database:
I noticed that the Ajax request is returning empty rows (/wp-admin/admin-ajax.php?action=h5p_content_results&id=4):
I checked the database and in this case the results table does have 5 results for this content id. You can see in the picture above that 5 rows have indeed been found. However, an empty array is returned instead of the actual results.
Additional Information:
Like I said the error seems to be inconsistent. Sometimes I am able to reproduce it sometimes not. The only thing I can say for sure is that the "bug" appears only on versions >= 1.15.7. Version 1.15.6 and bellow never have this problem.
I also noticed that when the bug appears, the users are still able to see their results under the My Results submenu (wp-admin/admin.php?page=h5p_results). I'm not sure what would cause such behavior. I ruled out plugin conflicts.