-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Max grade of 0 causes migration failure #7
Comments
One thing to note about the larger Moodle policy point, is that not all activities in Moodle core require the number of points to be more than 0. It's only if they use the standard mod form elements. Take quiz - you can set the points to 0, and then the grade item disappears from the gradebook, just like the old mod_hvp. |
Hi Eric! |
Sounds good to me. |
Thanks for looking at the patch and pointing this edge scenario. |
I'm very hesitant to delete data, even if very niche (maybe even more so, since it's harder for an admin to notice), especially related to teacher grading/feedback. Personally, I think that we should put an error in the output (while still continuing the conversion) and either:
|
Hi Eric!
With the new behaviour, no crucial information should be removed (the mod_hvp activity will be deleted only if it has no feedback overridden). |
Thanks Sara, sounds great! |
If a mod_hvp has a maximum grade of 0 set, then the migration is run you get:
mod_hvp allows activities to have a max grade of 0, which basically makes the grade have no effect in the gradebook (but it is still there), while, at least through the GUI, mod_h5p does not allow a max grade of 0.
So when the duplication is happening, the new module doesn't create a grade item (I haven't checked to confirm that the module is created at all), but api::duplicate_grade_item() assumes the new grade item exists, causing this scenario.
While the actual error from a coding standpoint looks pretty simple to remedy, there is a larger question of what should happen to migrate these. Do we just programmatically do it, allowing it to be 0 points, and then the next time the teacher tries to edit it, it will require them to change it?
The text was updated successfully, but these errors were encountered: