Add required functions for the completion library

fixes #34 #35
EQ-1663 Load iframe after resizing
Fix redirect url
EQ-1676 list_courses_for_user returns course id number
EQ-1583 Moodle 2.7 Event APIs #33

Replace deprecated APIs