The tables seem incomplete. How do you know that EG1832 and EG1952 conflict? Are there dates for the papers somewhere?
Once you had a pair of conflicting modules, you'd need to create two temporary tables of students taking each of the two modules, then select students that appear in both tables.