wooclap / moodle-mod_wooclap

Moodle plugin for Wooclap (https://www.wooclap.com/).
2 stars 5 forks source link

Adding wooclap_update_grade function resolves #23. #43

Open lucaboesch opened 2 months ago

lucaboesch commented 2 months ago

Could someone please review whether the code of this pull request holds? Thanks!

marco-verbeek commented 1 month ago

Hi @lucaboesch 👋🏼

We've looked into the issue and can confirm we're able to reproduce the issue. Updating the name of an activity created with the plugin throws the following error:

Debugging: You have declared one of wooclap_grade_item_update and wooclap_update_grades but not both. This will cause broken behaviour.

However, your PR cannot be merged as-is because it calls the wooclap_get_user_grades function, which is currently not implemented.

I've looked into different official implementations and they all seem to take a different approach. Do you know which one would work best?

Quiz mod https://github.com/moodle/moodle/blob/7d7a871eddf81cdc1e6f5ea9dda67cf9058dd032/mod/quiz/lib.php#L562

Assign mod https://github.com/moodle/moodle/blob/7d7a871eddf81cdc1e6f5ea9dda67cf9058dd032/mod/assign/lib.php#L1069

Data mod https://github.com/moodle/moodle/blob/7d7a871eddf81cdc1e6f5ea9dda67cf9058dd032/mod/data/lib.php#L1440

Thank you for your help, Luca 🚀 Marco