This function will be inteacting badly with the new MUC cache for course group/grouping data. It will fill and clear the cache for each group in the imported CSV.
We need to:
a) Test and see if the performance acceptable
b) See if we can improve the import code (maybe by loading the list of groupids before the import and then check for existing groups in the pre-import data and a list of processed records).