Exemplo n.º 1
0
 public function browse()
 {
     //get the survey id
     $surveyId = CRM_Utils_Request::retrieve('sid', 'Positive', $this);
     $signatures = CRM_Campaign_BAO_Petition::getPetitionSignature($surveyId);
     $this->assign('signatures', $signatures);
 }
Exemplo n.º 2
0
 function browse()
 {
     require_once 'CRM/Core/Permission.php';
     //get the survey id
     $surveyId = CRM_Utils_Request::retrieve('sid', 'Positive', $this);
     $signatures = CRM_Campaign_BAO_Petition::getPetitionSignature($surveyId);
     $this->assign('signatures', $signatures);
 }
/**
 * Get the list of signatories
 *
 * @param  array   $params           (reference ) input parameters
 *
 * @return array (reference )        contribution_id of created or updated record
 * @static void
 * @access public
 */
function &civicrm_survey_respondant_get(&$params)
{
    _civicrm_initialize();
    if (empty($params)) {
        return civicrm_create_error(ts('No input parameters present'));
    }
    if (!is_array($params)) {
        return civicrm_create_error(ts('Input parameters is not an array'));
    }
    if (!array_key_exists('survey_id', $params)) {
        return civicrm_create_error('survey_id mandatory');
    }
    if (array_key_exists('status_id', $params)) {
        $status_id = $params['status_id'];
    } else {
        $status_id = NULL;
    }
    $petition = new CRM_Campaign_BAO_Petition();
    $signatures = $petition->getPetitionSignature($params['survey_id'], $status_id);
    return $signatures;
}