Teacher cannot teach both 6th and 7th period. He can teach only one of these two.
You can insert this cardrelationship:
Select only those two periods in the timeoff - the constraint max 1 per day is applied only on those lessons that are marked as green.