refactored switch
Merge branch 'master' of https://github.com/hembergerik/sprint_ec_openedx