We have this issue too!
We ask either the teacher writing the report to fill in their name, or ask the Head of Dept. to do this. I would advise that is the best way forward, as you doing it, or finding long winded workarounds is just not practical.
Otherwise, put the onus on the timetabler to try and sort it out, by splitting groups, and making linked classes, and whatever other tricks are available.
Having said that, i've used some sql to extract information out of the database before which may be of use to you. You'll need to change some parts to fit in with what you want. I used it mostly to see the history of a particular aspect to see who changed what and when. I've added in the link to show resultset which i imagine would be a better way for you to use the code rather than on aspect name. You then wouldn't need the result_date part.
I know the whole lot really should be done by lots of table joins, but i just botched it together quickly at the time and can't easily get my head around multiple table joins. For this reason it wont extract the user's forename / surname, just their login ID which may be enough for you (?).
You may want to run a separate query to extract names of user agaist loginname, and ptu it in a lookup table.
Oh yeah, i do this on my VM, using a backup of live data, naturally
Hope it may be of some use
from sims.asm_result AS r1,
sims.db_user AS u1,
sims.asm_aspect AS a1,
sims.asm_resultset AS rs1,
sims.sims_person AS s1
where r1.student_id = s1.person_id
AND r1.aspect_id = a1.aspect_id
AND r1.resultset_id = rs1.resultset_id
AND aspect_name LIKE'_temp%'
AND operator_id = u1.person_id
AND result_date >DATEADD(day,-3,GETDATE())
orderby result_date desc, surname asc