Concerned over students who had to drop out of school because their parents or guardians lost their jobs or livelihood due to the coronavirus pandemic, the Supreme Court Monday said there is an obligation on all the states and Union Territories to ensure that children attend schools.