Modesty is usually imposed rather than prohibited. However, some countries place restrictions on the Islamic practice of wearing headscarves. Although the French restriction against religious symbols in public schools is not technically directed against Muslims in particular, many view it mainly as a ban against headscarves. While banishing headscarves shields secular people from seeing unwanted religious expression, it will lead many Muslims to view secular society as being intrinsically hostile to their views. The headscarf ban has ironically led many French Muslims to send their children to publicly subsidized Catholic schools (since there are so few Muslim schools). In 2008, the New York Times described one Catholic school in Marseille whose students were 80 percent Muslim. According to the school's headmaster:
If I banned the head scarf, half the girls wouldn't go to school at all. I prefer to have them here, talk to them and tell them that they have a choice. Many actually take it off after a while. My goal is that by the time they graduate they have made a conscious choice, one way or the other.
A 2014 Erik Meyersonn paper links Turkey's ban on wearing headscarves in school to an even more surprising fact: in the Turkish mayoral elections of 1994, electing Islamist mayors actually increased female high school graduation rates. The other beneficial impacts of electing Islamist mayors were reduced teenage marriage and greater long-run political participation for women. And having an Islamist mayor did not make female students more supportive of Islamist politics in the future. All these benefits came despite the fact that the primary Islamist party, the Refah or "Welfare" party, was not philosophically interested in furthering the emancipation of women. Refah did, however, dismantle one of the primary obstacles to women attending school -- the ban against headscarves. Until the Refah party itself was banned by Turkey's Constitutional Court, Refah-controlled municipalities did not enforce the headscarf ban. Conservative families were evidently more comfortable sending their daughters to mixed-sex classes if their daughters could wear headscarves. (Meyersonn also discusses other, less direct, ways that the Refah party may have lowered barriers to females attending school.)
How does Meyersonn show that Islamist mayors increase the high school graduation rates of females? Not by directly comparing areas with Islamist mayors to areas with secular mayors. The Refah party was more popular in poor and conservative Islamic areas. These areas might be expected to have lower female graduation rates regardless of what kind of mayor was elected. And, in fact, these areas did have lower female graduation rates.
Instead, Meyersonn isolates the causal impact of Islamist mayors by exploiting the fact that some elections are closer than others. If an Islamist party wins by one vote, the municipality gets an Islamist mayor. If the Islamist party loses by one vote, a secularist becomes mayor. If the two communities are the same except for these two votes, then their differing educational outcomes can be attributed to the fact that one had an Islamist mayor and the other didn't. Although Islamist parties were elected in areas with poor graduation rates for females, these rates would have been even worse if a secularist had been elected.