you're quite right, there are expectations of how you dress, what you're allowed to bring in (very little!) and how you behave. you have to follow the rules every time or risk getting caught out, no exceptions. you have to report everything that raises suspicions, so may be unpopular. education is a "privilege" and the prisoners get paid (very little!) to attend. if they mis-behave, they're out.
mostly, they're glad to get out of their cells (now called rooms) so will behave.