public static function register_course($courseinfo) {
        $params = array('courses' => array($courseinfo));
        $hubcourseids = self::call('hub_register_courses', $params);
        if (count($hubcourseids) != 1) {
            throw new moodle_exception('errorcoursewronglypublished', 'hub');
        }
        return $hubcourseids[0];
    }