/**
  * 		generates HTML for the Registration Questions meta box
  *		@access public
  *		@return void
  */
 public function _reg_questions_meta_box()
 {
     add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__before_question_group_questions', array($this, 'form_before_question_group'), 10, 1);
     add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__after_question_group_questions', array($this, 'form_after_question_group'), 10, 1);
     add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'form_form_field_label_wrap'), 10, 1);
     add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'form_form_field_input__wrap'), 10, 1);
     $question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options($this->_registration, $this->_registration->get('EVT_ID'));
     //EEH_Debug_Tools::printr( $question_groups, '$question_groups  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
     EE_Registry::instance()->load_helper('Form_Fields');
     $this->_template_args['att_questions'] = EEH_Form_Fields::generate_question_groups_html($question_groups);
     $this->_template_args['reg_questions_form_action'] = 'update_attendee_registration_form';
     $this->_template_args['REG_ID'] = $this->_registration->ID();
     $template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_reg_questions.template.php';
     echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
 }
/**
 * Render the registration admin page's custom questions area in the old fashion
 * and firing the old hooks. When this method is removed, we can probably also
 * remove the deprecated methods form_before_question_group, form_after_question_group,
 * form_form_field_label_wrap and form_form_field_input__wrap in Registrations_Admin_Page
 *
 * @param boolean         $do_default_action
 * @param EE_Admin_Page   $admin_page
 * @param EE_Registration $registration
 * @return bool
 * @throws \EE_Error
 */
function ee_deprecated_reg_questions_meta_box_old($do_default_action, $admin_page, $registration)
{
    //check if the old hooks are in use. If not, do the default
    if (!ee_deprecated_using_old_registration_admin_custom_questions_form_hooks() || !$admin_page instanceof EE_Admin_Page) {
        return $do_default_action;
    }
    add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__before_question_group_questions', array($admin_page, 'form_before_question_group'), 10, 1);
    add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__after_question_group_questions', array($admin_page, 'form_after_question_group'), 10, 1);
    add_filter('FHEE__EEH_Form_Fields__label_html', array($admin_page, 'form_form_field_label_wrap'), 10, 1);
    add_filter('FHEE__EEH_Form_Fields__input_html', array($admin_page, 'form_form_field_input__wrap'), 10, 1);
    $question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options($registration, $registration->get('EVT_ID'));
    EE_Registry::instance()->load_helper('Form_Fields');
    $template_args = array('att_questions' => EEH_Form_Fields::generate_question_groups_html($question_groups), 'reg_questions_form_action' => 'edit_registration', 'REG_ID' => $registration->ID());
    $template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_reg_questions.template.php';
    echo EEH_Template::display_template($template_path, $template_args, TRUE);
    //indicate that we should not do the default admin page code
    return false;
}