At the Main Menu, press Up, Left, Down, Left, Right, Black, Black, White.
Open the locked door and chest:
Find all the lost items on the notice in the Gryffindor common room until you find the Key (first floor, behind the statue). Then, use the Key to unlock the door on the 6th floor, as well as the locked chest in the Muggle Studies area.
Secret Cards and Beans:
Use Hermione and cast the Glacius spell on every fireplace. Each time you do this a Wizard Card will appear. Also, use Hermione and buy the Snufflifores Spellbook from the Weasley twins. This book will teach you to turn flying books into mice. Each time you turn a book into a mouse, the mouse will run into a hole in the room and a Wizard Card or a Bean will pop out.
Thanks to Revolution readers lordofthepants and Schneider209!