ndunand / moodle-mod_choicegroup

Moodle "Group Choice" plugin
https://moodle.org/plugins/mod_choicegroup
34 stars 57 forks source link

mod_choicegroup: Check user object really exists before cloning it #102

Closed tonyjbutler closed 7 years ago

tonyjbutler commented 7 years ago

We too have been experiencing https://github.com/ndunand/moodle-mod_choicegroup/issues/98, so I've had a quick look into it. I haven't managed to work out the root cause of the issue -- i.e. how there can be responses returned by choicegroup_get_responses() that don't have a corresponding user object returned by availability->filter_user_list() -- but to avoid the fatal error (which otherwise prevents the page loading at all) I've just added a simple check for the existence of the user object.

ndunand commented 7 years ago

Thanks! Merging now, you fix will be included in the next release.