Fix problem of get_context_course

Fix the problem of different ways to get context course in moodle version minor to 2.2 and  moodle version greater than 2.2
Merge pull request #4 from fabianp60/patch-2

Fix problem of get_context_course