public function process() {
        if ($data = $this->get_data()) {
            foreach ($data->userids as $userid) {
                if ($data->action === 'revoke') {
                    foreach ($data->versionids as $versionid) {
                        \tool_policy\api::revoke_acceptance($versionid, $userid, $data->note);
                    }
                } else if ($data->action === 'accept') {
                    \tool_policy\api::accept_policies($data->versionids, $userid, $data->note);
                } else if ($data->action === 'decline') {
                    \tool_policy\api::decline_policies($data->versionids, $userid, $data->note);
                }
            }
        }
    }