fixes bug in addcourse view and fixes bug in mongoid config file