Court victory for TSC official sacked over alleged relationship with pupil