As the COVID-19 pandemic expands in the U.S. and containment efforts continue, school districts in Texas are now closed, Gov. Greg Abbott’s executive order.

Families are struggling to figure out what to do next. And so are districts. Everyone’s learning on the fly.

But here’s the thing — teaching kids online isn’t new. Some states have been doing this routinely for years. Last year, Utah had 336,586 students enrolled in courses through its state online education network, and Florida requires every school district to have a virtual school liaison. In Texas, there are six school districts or charter schools that offer full-time online education.

But in a state with about 1,200 districts and charters, six districts are a drop in the bucket. While total enrollment in these campuses is around 16,000, that’s just three-tenths of 1 percent of Texas students.

Now here’s the plot twist: What if I told you that there are only six districts in Texas that offer this kind of education because those six districts are the only ones allowed to offer it?

It’s true. In 2013, the Texas Legislature expanded the Texas Virtual School Network, but included a line that said only full-time schools already in operation could continue to offer that option to students. This created an artificially small education space where only legacy actors can operate and most other school districts are at a disadvantage.

Suddenly, seven years later, every kid in the state needs a full-time remote option. And Texas is behind the curve. Kudos to all the teachers, principals and superintendents trying to make this work — not to mention parents and students. This is difficult stuff, and the timeline is yesterday.

But what if they’d had more time? What if districts had been able to gradually build an online presence, instead of scrambling to create something from scratch over Spring Break?

Here’s the other plot twist: It’s not that districts haven’t asked for the chance. It’s that legislators haven’t gotten code out of their way.

Just last year, a full rewrite of the code around virtual schools was proposed in the Texas Legislature, intending to modernize it for the 21st century. It would have pulled that six-school restriction, and a bunch of other barriers, out of other districts’ paths. Staff members from several different school districts testified for the bill, asking for the flexibility to offer additional options to kids.

Unfortunately, the bill failed to pass. If it had passed, districts around the state might have been more prepared for this moment.

Texas is taking the right steps to enable districts to find solutions during an unprecedented situation. But it didn’t have to be this hard — or this sudden. It shouldn’t take a pandemic for districts to finally — and temporarily — be allowed to do something that should already be an option. It’s time for Texas to free up districts to create solutions that work for their students.

Hopefully, 100-percent remote learning won’t have to be the new normal for long. We all pray this pandemic resolves quickly, and everyone can go back to class. But it would have been nice to have had the opportunity to be more prepared.

Either way, this situation shows the benefit of allowing districts flexibility to innovate and adapt. This won’t be the last time that districts need the opportunity for rapid response and remote learning — only a few years ago, Hurricane Harvey drenched textbooks and classrooms. And even if we never faced another emergency, it just makes sense to give districts equal autonomy over remote instruction. For now, Texas can and should support districts as they work to find emergency solutions. And next session, opening up district flexibility in this space should be at the top of the education agenda.