Panic Room features a female ... who locks herself away willingly... if the class has a thorough understanding of the 2 SS, then it could work.
I also searched imdb.com under "plot" and put in "woman" and "confined" and got The Second Room, which I have neither heard of nor seen:
The Second Room (1995)
Stanley, an isolated architect, has spent a lifetime confined in the "first room" of missed opportunities and unspoken words. He encounters Moira, a woman who Stanley believes has found fulfillment. He follows her, seduced by the pleasure of watching her daily activities. Through a dark and complex relationship navigated on the narrow ledge between fantasy and reality, Stanley follows Moira's path into the "second room" to find his own completion.