664fe87f29
The participants page will now show (to users that have moodle/role:assign) the relevant enrolments for each participant. This is done with a second SELECT using a WHERE id IN() so we are limited to doing it with small datasets. This is for 2 reasons - we cannot retrieve all teh data in the "main" SELECT because the outer joins will bring dup rows, breaking LIMIT - we cannot use the main SELECT as a subselect because we cannot retrieve the LIMIT part of the statement with the current dmllib - on large courses / sitecourse performance would be horrible so it is limited to paginated datasets. It is doing 20 recs at a time, the "extra" SELECT takes ~7ms on a some large Pg databases). This will generate an extra DB query on Oracle (and any other DB that cannot rewind the recordset) because we walk the main rs twice. While at it, ensure we mark the unsortable columns thus...