MDL-40056 events: Use correct course module id while fetching context