This is true for all web applications, but basically, using the same basic domain name should allow you to share the cookie related to the sites, unless there is a "cookie path" defined (in your case to /2011 or /2012).
Cookie paths are likely to be defined
You say you have a moodle installation, so I assume you have only one installation and you are accessing it through 2 different virtual hosts which point to the same directory on disk, right?
I've been skimming through the Moodle code and the only reference I found to cookies paths is in /lib/cookies.js. Maybe that launches you in the right direction. In any case, once you get rid of the path part, and given you're on the same domain, you will be able to connect to one or another freely once you logged in into one of them.