fix: use context_xxxx::instance instead of old functions

get context related functions are deprecated since Moodle 2.2

Signed-off-by: Eric Villard <dev@eviweb.fr>