/** Creates the table with testinvite data for an experiment */
 function create_testinvite_experiment_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $heading = array(lang('testsurvey'), lang('participant'), lang('token'), lang('datesent'), lang('datecompleted'), lang('datereminder'), lang('datemanualreminder'), lang('actions'));
     $CI->table->set_heading($heading);
 }
 /** Creates the table with leader data */
 function create_leader_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $heading = array(lang('experiment'), lang('leader'), lang('actions'));
     //if (empty($id)) array_unshift($heading, lang('experiment'));
     $CI->table->set_heading($heading);
 }
 /** Creates the table with testcat data */
 function create_testcat_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $heading = array(lang('name'), lang('actions'));
     if (empty($id)) {
         array_unshift($heading, lang('test'));
     }
     $CI->table->set_heading($heading);
 }
 /** Creates the table with participant data */
 function create_participant_table($id = NULL, $find = FALSE)
 {
     $CI =& get_instance();
     base_table($id);
     $heading = array(lang('name'), lang('dob'), lang('age'), lang('dyslexicparent'), lang('multilingual'), lang('phone'), lang('actions'));
     if ($find) {
         array_splice($heading, -1, 1, array(lang('status'), lang('actions')));
     }
     $CI->table->set_heading($heading);
 }
 /** Creates the table with call data */
 function create_call_table($id = NULL, $show_caller = TRUE)
 {
     $CI =& get_instance();
     base_table($id);
     $heading = array(lang('participant'), lang('experiment'), lang('action'), lang('order'), lang('start_call'), lang('end_call'), lang('actions'));
     if ($show_caller) {
         array_unshift($heading, lang('caller'));
     }
     $CI->table->set_heading($heading);
 }
 /** Creates the table with result data */
 function create_result_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $heading = array(lang('phase'), lang('trial'), lang('lookingtime'), lang('nrlooks'), lang('actions'));
     if (empty($id)) {
         array_unshift($heading, lang('participant'), lang('participant'));
     }
     $CI->table->set_heading($heading);
 }
 /** Creates the table with testsurvey data */
 function create_testsurvey_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $heading = array(lang('limesurvey_id'), lang('whensent'), lang('survey_description'), lang('actions'));
     if (empty($id)) {
         array_unshift($heading, lang('test'));
     }
     $CI->table->set_heading($heading);
 }
 /** Creates the table with percentile data */
 function create_percentile_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $heading = array(lang('gender'), lang('age'), lang('score'), lang('percentile'), lang('actions'));
     if (empty($id)) {
         array_unshift($heading, lang('testcat'));
         array_unshift($heading, lang('test'));
     }
     $CI->table->set_heading($heading);
 }
 /** Creates the table with score data, but only totals (for root test categories) */
 function create_total_score_table($testcats, $testinvites)
 {
     $CI =& get_instance();
     base_table();
     $CI->table->set_heading(lang('participant'), lang('score'), lang('date'), lang('age'), lang('percentile'), lang('language_age'), lang('actions'));
     foreach ($testcats as $tc) {
         foreach ($testinvites as $ti) {
             $score = $CI->testCatModel->total_score($tc->id, $ti->id);
             $t = $CI->testCatModel->get_test_by_testcat($tc);
             if ($score->score > 0) {
                 $p = $CI->testInviteModel->get_participant_by_testinvite($ti);
                 $score_age = age_in_months($p, $score->date);
                 $p_link = participant_get_link($p);
                 $percentile = $CI->percentileModel->find_percentile($tc->id, $p->gender, $score_age, $score->score);
                 $language_age = $CI->percentileModel->find_50percentile_age($tc->id, $p->gender, $score->score);
                 $edit_link = anchor('score/edit_all/' . $t->id . '/' . $p->id, img_edit());
                 $actions = implode(' ', array($edit_link));
                 $CI->table->add_row($p_link, $score->score, output_date($score->date), $score_age, $percentile, $language_age, $actions);
             }
         }
     }
     return $CI->table->generate();
 }
 /** Creates the table with location data */
 function create_location_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $CI->table->set_heading(lang('name'), lang('roomnumber'), lang('actions'));
 }
 /**
  * Shows an age overview of all participants
  */
 public function age_overview()
 {
     // Get the number of months to look in the future
     $date = $this->input->post('date') ? $this->input->post('date') : output_date('now', TRUE);
     // Set up the table
     base_table();
     $this->table->set_heading('Leeftijd in maanden', 'Aantal actieve proefpersonen', 'Aantal dyslectisch', 'Aantal tweetalig', lang('actions'));
     // Calculate the number of participants per month, given the data
     foreach ($this->participantModel->get_participants_per_month($date) as $p) {
         $this->table->add_row($p->age, $p->count, $p->dyslexic, $p->multilingual, anchor('participant/age_overview_detail/' . $p->age . '/' . $date, img_zoom('participants')));
     }
     $data['table'] = $this->table->generate();
     $data['date'] = $date;
     $data['page_info'] = $this->load->view('participant_age_overview', $data, TRUE);
     $data['page_title'] = lang('participants');
     $this->load->view('templates/header', $data);
     $this->load->view('templates/table_view', $data);
     $this->load->view('templates/footer');
 }
 /** Creates the table with dyslexia data */
 function create_dyslexia_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $CI->table->set_heading(lang('participant'), lang('parent'), lang('statement'), lang('emt_score'), lang('klepel_score'), lang('vc_score'), lang('comment'), lang('actions'));
 }
 /** Creates the table with testtemplate data */
 function create_testtemplate_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $CI->table->set_heading(lang('test'), lang('language'), lang('template'), lang('actions'));
 }
 /** Creates the table with participants that need to be called back */
 function create_participation_callback_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $CI->table->set_heading(lang('participant'), lang('experiment'), lang('call_back_date'), lang('comment'), lang('actions'));
 }
 /** Creates the table with user data */
 function create_user_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $CI->table->set_heading(lang('username'), lang('role'), lang('email'), lang('phone'), lang('mobile'), lang('actions'));
 }
 /** Creates the table with availability data */
 function create_availability_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $CI->table->set_heading(lang('availability'), lang('comment'), lang('actions'));
 }
 /** Creates the table with relation data */
 function create_relation_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $CI->table->set_heading(lang('experiment'), lang('relation'), lang('experiment'), lang('actions'));
 }
 /** Creates the table with closing data */
 function create_closing_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $CI->table->set_heading(lang('location'), lang('closing'), lang('comment'), lang('actions'));
 }
 /** Creates the table with comment data */
 function create_comment_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $CI->table->set_heading(lang('participant'), lang('comment'), lang('posted_at'), lang('posted_by'), lang('actions'));
 }
 /** Creates the table with language data */
 function create_language_table($id = NULL)
 {
     $CI =& get_instance();
     base_table($id);
     $CI->table->set_heading(lang('participant'), lang('language'), lang('percentage'), lang('actions'));
 }