The children had to collect rubbish, didn’t they? или The children had to collect rubbish, had not they? С объяснением
The children had to collect rubbish, didn’t they?
Потому что, глагол (had) стоит в прошедшем времени.