}
//
- // query for access to board nomination process
+ // helper functions for access to board nomination / discussion process
//
- $start_date = $this->nomination_process_contrib_start_date;
- $end_date = $this->nomination_process_contrib_end_date;
-
/**
* @param string $query_name Name of query in authsources
* @param array $extra_params Associative array of parameters to include in query
// the time window with a single donation. this approximates whether
// the person was, or would have been, a member during the configured
// time window.
- $analyze_history = function ($selective_donations_history)
+ $nomination_process_analyze_history = function ($selective_donations_history)
use ($start_date, $end_date) {
$eligible = false;
return false;
};
+ //
+ // nomination form participation specific checks
+ //
+
+ $start_date = $this->nomination_process_contrib_start_date;
+ $end_date = $this->nomination_process_contrib_end_date;
+
$donation_params = ['start_date' => $start_date, 'end_date' => $end_date];
$gift_member_params = ['start_date' => $start_date, 'end_date' => $end_date, 'gift_redeem_page_id' => intval($this->gift_redeem_page_id)];
$adhoc_params = ['adhoc_access_group_id' => intval($this->nomination_process_adhoc_access_group_id)];
if ($this->nomination_process_active == 'true' ) {
- if ($compare_res($donation_query('query_nomination_process_adhoc', $adhoc_params), 1) || ($attributes['is_member'] == ['true']
- && ($analyze_history($donation_query('query_nomination_process_donations', $donation_params))
- || $compare_res($donation_query('query_nomination_process_gift_receipt', $gift_member_params), 1)))) {
+ if ($compare_res($donation_query('query_nomination_process_adhoc', $adhoc_params), 1)) {
+ $attributes['nomination_process'] = ['true'];
+
+ } elseif ($attributes['is_member'] == ['true']
+ && ($nomination_process_analyze_history($donation_query('query_nomination_process_donations', $donation_params))
+ || $compare_res($donation_query('query_nomination_process_gift_receipt', $gift_member_params), 1))) {
$attributes['nomination_process'] = ['true'];
} else {