catalyst / moodle-local_cohortauto

Automatically add users into cohorts. (Previously moodle-auth_mcae.)
https://moodle.org/plugins/local_cohortauto
11 stars 14 forks source link

NULL value for column idnumber is not allowed on Moodle 4.1+ anymore #26

Closed senaiboy closed 6 months ago

senaiboy commented 1 year ago

https://tracker.moodle.org/browse/MDL-77058 https://moodle.org/mod/forum/discuss.php?d=443384

From Moodle 4.1+ onwards, the idnumber column needs to be "string" type. Cohorts created by the plugin has the value NULL for idnumber column, which results in error.

danmarsden commented 1 year ago

thansk for the report - although I'm not sure the title is correct - the idnumber field in the moodle database table allows null values, but the new report in core throws errors when they exist - I suspect this is an issue with the core Moodle report - not necessarily an issue with this plugin as there are other processes that create cohorts and may use a null value in that field, but if you want to submit a PR to convert it to storing an empty string feel free! :-)