How does the sentence end?

Throughout the year Elena was training Megan in business marketing when
Megan was the student.