public static function update_competency($competency) {
        $params = self::validate_parameters(self::update_competency_parameters(), array(
            'competency' => $competency
        ));
        $params = $params['competency'];

        $competency = api::read_competency($params['id']);
        self::validate_context($competency->get_context());

        $params = (object) $params;

        return api::update_competency($params);
    }