Fixed calendar queries and added public calendar to study page