original_string: 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);
                  }
              }
          }
      }
code: 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);
                  }
              }
          }
      }
code_tokens: 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 ) ; } } } }
docstring: Process form submission
docstring_tokens: Process form submission