<commit_before><?php
/*
 +--------------------------------------------------------------------+
 | CiviCRM version 4.4                                                |
 +--------------------------------------------------------------------+
 | Copyright CiviCRM LLC (c) 2004-2013                                |
 +--------------------------------------------------------------------+
 | This file is a part of CiviCRM.                                    |
 |                                                                    |
 | CiviCRM is free software; you can copy, modify, and distribute it  |
 | under the terms of the GNU Affero General Public License           |
 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
 |                                                                    |
 | CiviCRM is distributed in the hope that it will be useful, but     |
 | WITHOUT ANY WARRANTY; without even the implied warranty of         |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
 | See the GNU Affero General Public License for more details.        |
 |                                                                    |
 | You should have received a copy of the GNU Affero General Public   |
 | License and the CiviCRM Licensing Exception along                  |
 | with this program; if not, contact CiviCRM LLC                     |
 | at info[AT]civicrm[DOT]org. If you have questions about the        |
 | GNU Affero General Public License or the licensing of CiviCRM,     |
 | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
 +--------------------------------------------------------------------+
*/

/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2013
 * $Id$
 *
 */
class CRM_Expertapplication_Form_Report_MyInterviews extends CRM_Report_Form {

  protected $_emailField = FALSE;
  protected $_phoneField = FALSE;

  function __construct() {
    $this->_columns = array(
      'civicrm_contact' =>
      array(
        'dao' => 'CRM_Contact_DAO_Contact',
        'fields' =>
        array(
          'id' =>
          array(
            'required' => TRUE,
            'no_display' => TRUE,
          ),
          'sort_name' =>
          array('title' => ts('Contact Name'),
            'default' => TRUE,
            'no_repeat' => TRUE,
          ),
        ),
        'filters' =>
        array(
          'sort_name' =>
          array('title' => ts('Contact Name'),
          ),
        ),
        'group_bys' =>
        array(
          'sort_name' =>
          array(
            'name' => 'id',
            'title' => ts('Contact'),
            'default' => TRUE,
          ),
        ),
        'order_bys' =>
        array(
          'sort_name' =>
          array('title' => ts('Contact Name')),
        ),
        'grouping' => 'contact-fields',
      ),
      'civicrm_email' =>
      array(
        'dao' => 'CRM_Core_DAO_Email',
        'fields' =>
        array(
          'email' =>
          array(
            'title' => 'Email',
            'default' => TRUE,
          ),
        ),
        'order_bys' =>
        array(
          'email' =>
          array('title' => ts('Email')),
        ),
        'grouping' => 'contact-fields',
      ),
      'civicrm_phone' =>
      array(
        'dao' => 'CRM_Core_DAO_Email',
        'fields' =>
        array(
          'phone' =>
          array('title' => 'Phone'),
        ),
        'grouping' => 'contact-fields',
      ),
      'civicrm_activity' =>
      array(
        'dao' => 'CRM_Activity_DAO_Activity',
        'fields' =>
        array(
          'activity_type_id' =>
          array('title' => ts('Activity Type'),
            'default' => TRUE,
            'type' => CRM_Utils_Type::T_STRING,
          ),
          'duration' =>
          array(
            'title' => 'Duration',
            'statistics' =>
            array(
              'sum' => ts('Total Duration'),
            ),
          ),
          'id' =>
          array(
            'title' => 'Total Activities',
            'required' => TRUE,
            'statistics' =>
            array(
              'count' => ts('Activity Count'),
            ),
          ),
        ),
        'filters' =>
        array(
          'activity_date_time' =>
          array('operatorType' => CRM_Report_Form::OP_DATE),
          'activity_type_id' =>
          array('title' => ts('Activity Type'),
            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
            'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
          ),
          'status_id' =>
          array('title' => ts('Activity Status'),
            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
            'options' => CRM_Core_PseudoConstant::activityStatus(),
          ),
          'priority_id' =>
          array('title' => ts('Priority'),
            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
            'options' => CRM_Core_PseudoConstant::get('CRM_Activity_DAO_Activity', 'priority_id'),
          ),
        ),
        'group_bys' =>
        array(
          'activity_date_time' =>
          array('title' => ts('Activity Date'),
            'frequency' => TRUE,
          ),
          'activity_type_id' =>
          array('title' => ts('Activity Type'),
            'default' => TRUE,
          ),
        ),
        'order_bys' =>
        array(
          'activity_date_time' =>
          array('title' => ts('Activity Date')),
          'activity_type_id' =>
          array('title' => ts('Activity Type')),
        ),
        'grouping' => 'activity-fields',
        'alias' => 'activity',
      ),
    );

    parent::__construct();
  }

  function select() {
    $select = array();
    $this->_columnHeaders = array();
    foreach ($this->_columns as $tableName => $table) {
      if (array_key_exists('group_bys', $table)) {
        foreach ($table['group_bys'] as $fieldName => $field) {
          if (CRM_Utils_Array::value($fieldName, $this->_params['group_bys'])) {

            switch (CRM_Utils_Array::value($fieldName, $this->_params['group_bys_freq'])) {<commit_msg>added report for my interviews for rct<commit_after><?php
/*
 +--------------------------------------------------------------------+
 | CiviCRM version 4.4                                                |
 +--------------------------------------------------------------------+
 | Copyright CiviCRM LLC (c) 2004-2013                                |
 +--------------------------------------------------------------------+
 | This file is a part of CiviCRM.                                    |
 |                                                                    |
 | CiviCRM is free software; you can copy, modify, and distribute it  |
 | under the terms of the GNU Affero General Public License           |
 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
 |                                                                    |
 | CiviCRM is distributed in the hope that it will be useful, but     |
 | WITHOUT ANY WARRANTY; without even the implied warranty of         |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
 | See the GNU Affero General Public License for more details.        |
 |                                                                    |
 | You should have received a copy of the GNU Affero General Public   |
 | License and the CiviCRM Licensing Exception along                  |
 | with this program; if not, contact CiviCRM LLC                     |
 | at info[AT]civicrm[DOT]org. If you have questions about the        |
 | GNU Affero General Public License or the licensing of CiviCRM,     |
 | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
 +--------------------------------------------------------------------+
*/

/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2013
 * $Id$
 *
 */
class CRM_Expertapplication_Form_Report_MyInterviews extends CRM_Report_Form {

  protected $_emailField = FALSE;
  protected $_phoneField = FALSE;

  function __construct() {
    $this->_columns = array(
      'civicrm_contact' =>
      array(
        'dao' => 'CRM_Contact_DAO_Contact',
        'fields' =>
        array(
          'id' =>
          array(
            'required' => TRUE,
            'no_display' => TRUE,
          ),
          'sort_name' =>
          array('title' => ts('Contact Name'),
            'default' => TRUE,
            'no_repeat' => TRUE,
          ),
        ),
        'filters' =>
        array(
          'sort_name' =>
          array('title' => ts('Contact Name'),
          ),
        ),
        'group_bys' =>
        array(
          'sort_name' =>
          array(
            'name' => 'id',
            'title' => ts('Contact'),
            'default' => TRUE,
          ),
        ),
        'order_bys' =>
        array(
          'sort_name' =>
          array('title' => ts('Contact Name')),
        ),
        'grouping' => 'contact-fields',
      ),
      'civicrm_email' =>
      array(
        'dao' => 'CRM_Core_DAO_Email',
        'fields' =>
        array(
          'email' =>
          array(
            'title' => 'Email',
            'default' => TRUE,
          ),
        ),
        'order_bys' =>
        array(
          'email' =>
          array('title' => ts('Email')),
        ),
        'grouping' => 'contact-fields',
      ),
      'civicrm_phone' =>
      array(
        'dao' => 'CRM_Core_DAO_Email',
        'fields' =>
        array(
          'phone' =>
          array('title' => 'Phone'),
        ),
        'grouping' => 'contact-fields',
      ),
      'civicrm_activity' =>
      array(
        'dao' => 'CRM_Activity_DAO_Activity',
        'fields' =>
        array(
          'activity_type_id' =>
          array('title' => ts('Activity Type'),
            'default' => TRUE,
            'type' => CRM_Utils_Type::T_STRING,
          ),
          'activity_subject' =>
          array('title' => ts('Subject'),
            'default' => TRUE,
          ),
          'activity_date_time' =>
          array('title' => ts('Activity Date'),
            'required' => TRUE,
          ),
        ),
        'filters' =>
        array(
          'activity_date_time' =>
          array('operatorType' => CRM_Report_Form::OP_DATE),
          'activity_type_id' =>
          array('title' => ts('Activity Type'),
            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
            'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
          ),
          'status_id' =>
          array('title' => ts('Activity Status'),
            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
            'options' => CRM_Core_PseudoConstant::activityStatus(),
          ),
          'priority_id' =>
          array('title' => ts('Priority'),
            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
            'options' => CRM_Core_PseudoConstant::get('CRM_Activity_DAO_Activity', 'priority_id'),
          ),
        ),
        'order_bys' =>
        array(
          'activity_date_time' =>
          array('title' => ts('Activity Date')),
          'activity_type_id' =>
          array('title' => ts('Activity Type')),
        ),
        'grouping' => 'activity-fields',
        'alias' => 'activity',
      ),
    );

    parent::__construct();
  }

  function select() {
    $select = array();
    $this->_columnHeaders = array();
    foreach ($this->_columns as $tableName => $table) {
      if (array_key_exists('group_bys', $table)) {
        foreach ($table['group_bys'] as $fieldName => $field) {
          if (CRM_Utils_Array::value($fieldName, $this->_params['group_bys'])) {

            switch (CRM_Utils_Array::value($fieldName, $this->_params['group_bys_freq'])) {
{'fraction_non_alphanumeric': 0.1757908055672712, 'fraction_numerical': 0.004217629692113032, 'mean_word_length': 1.3617529880478088, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 173, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3625563', 'n_tokens_mistral': 3226, 'n_tokens_neox': 3136, 'n_words': 692}