Updated for Moodle 2.5

-Updated deprecated functions
-Added set_types to elimate silent dev warnings
-Updated version