$cm->get_custom_data() is deprecated

$cm->get_custom_data() no longer work with Moodle 2.7+, use $cm->customdata instead.