public static function submit_accept_on_behalf($jsonformdata) {
        // We always must pass webservice params through validate_parameters.
        $params = self::validate_parameters(self::submit_accept_on_behalf_parameters(),
            ['jsonformdata' => $jsonformdata]);

        self::validate_context(context_system::instance());

        $serialiseddata = json_decode($params['jsonformdata']);

        $data = array();
        parse_str($serialiseddata, $data);

        // The last param is the ajax submitted data.
        $mform = new accept_policy(null, $data, 'post', '', null, true, $data);

        // Do the action.
        $mform->process();

        return true;
    }
public static function submit_accept_on_behalf($jsonformdata) {
        // We always must pass webservice params through validate_parameters.
        $params = self::validate_parameters(self::submit_accept_on_behalf_parameters(),
            ['jsonformdata' => $jsonformdata]);

        self::validate_context(context_system::instance());

        $serialiseddata = json_decode($params['jsonformdata']);

        $data = array();
        parse_str($serialiseddata, $data);

        // The last param is the ajax submitted data.
        $mform = new accept_policy(null, $data, 'post', '', null, true, $data);

        // Do the action.
        $mform->process();

        return true;
    }
public static function submit_accept_on_behalf ( $ jsonformdata ) { // We always must pass webservice params through validate_parameters. $ params = self :: validate_parameters ( self :: submit_accept_on_behalf_parameters ( ) , [ 'jsonformdata' => $ jsonformdata ] ) ; self :: validate_context ( context_system :: instance ( ) ) ; $ serialiseddata = json_decode ( $ params [ 'jsonformdata' ] ) ; $ data = array ( ) ; parse_str ( $ serialiseddata , $ data ) ; // The last param is the ajax submitted data. $ mform = new accept_policy ( null , $ data , 'post' , '' , null , true , $ data ) ; // Do the action. $ mform -> process ( ) ; return true ; }
Submit the create group form.

@param string $jsonformdata The data from the form, encoded as a json array.
@return int new group id.
Submit the create group form .