It's a little difficult to follow all your examples & 'ands", so I'll just give my suggested version: During this time, he checked the identification of incoming students and, after his shift ended, he wandered the fair. The highlighted commas separate the time expression, much like the very first comma in the sentence. There is no need to have a comma after 'students' because there is not a change in or repetition of subject.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.