On upgrading a site to Moodle 3.1.1 I found that Site administration menu items were expanding the wrong items. E.g. I would click on Plugins and the Competencies menu item would expand, with the arrow to the left of Plugins changing to the down ("expanded") images, and the arrow to the left of Competencies remaining as a right arrow ("not expanded").
On further investigation I found this issue occurred after visiting the Site administation → Notifications page.
This issue occurred with Moodle 3.1.1 (Build: 20160711) on Microsoft Windows Server 2008 R2 and PHP v5.6.4.