Hi,
Creating dynamic cohorts with a very large (tens of thousands) user list will fail because the SQL being generated to insert into cohort_members is too big a query for our MySQL servers.
In line 311 of cohorts/lib.php you'll find the code where this query is being generated.
The obvious solution would be to do this insert in batches, but I don't really want to be modifying core Totara code and we don't know what else this would break.
Is there a better solution or a known fix for this? Will using dynamic cohorts of this size cause us any other problems elsewhere?