h5p / moodle-mod_hvp

H5P Plugin for Moodle
GNU General Public License v3.0
131 stars 169 forks source link

Reset support needed in H5P-plugin #150

Open KSLaring opened 7 years ago

KSLaring commented 7 years ago

When developing courses or when reusing exisiting courses in Moodle, it is common to reset the course to clear all user data, e.g. prior attempts and so on.

Course reset is currently not supported by the H5P-activity, and we get a "Reset not supported" error message when we reset a course, which leaves us in doubt about how to proceed. Is user data still in there and we really need to delete the H5P-activity and recreate it? Is user data dropped? If teachers are unsure about how the module works, they might choose not to use it.

In short, support for course reset is needed.

https://docs.moodle.org/dev/Implementing_Reset_course_functionality_in_a_module

(There is probably a typo in the suggestion mod/fourm/lib.php -> mod/forum/lib.php)

thomasmars commented 7 years ago

Hi, H5P only stores user data if you have enabled "save content state". I have created an issue in the public tracker to make sure you can reset this when resetting the rest of the course. Other data is stored within Moodle's APIs (e.g. gradebook), which can already be reset.

foxlapinou commented 5 years ago

Hi, It's sad to see that more than 2 years later, reset functionnality still hasn't been included. I hope that, better integration of H5P into Moodle being something planned to Moodle 3.8 (see https://docs.moodle.org/dev/Roadmap#Moodle_3.8_and_beyond:_in_progress), this will come in soon.

otacke commented 5 years ago

@foxlapinou H5P is an open source project, and the small H5P core team can't do it all on their own. Just because someone utters a wish for a feature, they can't promise to implement it (in a timely manner). So, how could more people be motivated to contribute code to the development or fund it?

pmaneggia commented 5 months ago

Hi @otacke & @thomasmars - I created PR https://github.com/h5p/moodle-mod_hvp/pull/548 for this issue. Working on it, I noticed that the callback to delete an instance of the activity does not clear the table hvp_content_user_data, so I added that as well.