http://www.d20pfsrd.com/basics-ability-scores/glossary
under rest, it shows the benefits and penalties. There are many more rules than "armored or unarmored." It also notes the following:
"For most creatures resting means sleeping. In some worlds some races can gain the benefits of rest simply by sitting quietly maintaining an awareness of their surroundings, while in other worlds those races must sleep, which leaves them vulnerable to attack."
Therefor I believe it not only depends on the module, but the DM. Which in the end, will always be the final say.
just my 2 cents, hope it helps.