/** Specifies the contents of the edit test page */ public function edit($test_id) { $test = $this->testModel->get_test_by_id($test_id); $data['page_title'] = sprintf(lang('edit_test'), $test->name); $data['action'] = 'test/edit_submit/' . $test_id; $data = add_fields($data, 'test', $test); $this->load->view('templates/header', $data); $this->load->view('test_edit_view', $data); $this->load->view('templates/footer'); }
/** Specifies the contents of the edit dyslexia page */ public function edit($dyslexia_id) { $dyslexia = $this->dyslexiaModel->get_dyslexia_by_id($dyslexia_id); $data['participant'] = $this->dyslexiaModel->get_participant_by_dyslexia($dyslexia); $data['page_title'] = lang('edit_dyslexia'); $data['new_dyslexia'] = FALSE; $data['action'] = 'dyslexia/edit_submit/' . $dyslexia_id; $data = add_fields($data, 'dyslexia', $dyslexia); $this->load->view('templates/header', $data); $this->load->view('dyslexia_edit_view', $data); $this->load->view('templates/footer'); }
/** Specifies the contents of the edit location page */ public function edit($location_id) { // Set default values $location = $this->locationModel->get_location_by_id($location_id); $data['page_title'] = sprintf(lang('edit_location'), $location->name); $data['new_location'] = FALSE; $data['action'] = 'location/edit_submit/' . $location_id; $data = add_fields($data, 'location', $location); $this->load->view('templates/header', $data); $this->load->view('location_edit_view', $data); $this->load->view('templates/footer'); }
/** Specifies the contents of the add testinvite page */ public function add() { $testsurveys = $this->testSurveyModel->get_all_testsurveys(); $participants = $this->participantModel->get_all_participants(TRUE); $data['testsurveys'] = testsurvey_options($testsurveys); $data['participants'] = participant_options($participants); $data['page_title'] = lang('add_testinvite'); $data['action'] = 'testinvite/add_submit/'; $data = add_fields($data, 'testinvite'); $this->load->view('templates/header', $data); $this->load->view('testinvite_edit_view', $data); $this->load->view('templates/footer'); }
/** Specifies the contents of the edit testtemplate page */ public function edit($testtemplate_id) { $data['tests'] = $this->testModel->get_all_tests(); $testtemplate = $this->testTemplateModel->get_testtemplate_by_id($testtemplate_id); $test = $this->testTemplateModel->get_test_by_testtemplate($testtemplate); $data['test'] = $test; $data['page_title'] = sprintf(lang('edit_testtemplate'), $test->name); $data['new_testtemplate'] = FALSE; $data['action'] = 'testtemplate/edit_submit/' . $testtemplate_id; $data = add_fields($data, 'testtemplate', $testtemplate); $this->load->view('templates/header', $data); $this->load->view('testtemplate_edit_view', $data); $this->load->view('templates/footer'); }
/** Specifies the contents of the edit percentile page */ public function edit($percentile_id) { $percentile = $this->percentileModel->get_percentile_by_id($percentile_id); $test = $this->percentileModel->get_test_by_percentile($percentile); $testcat = $this->percentileModel->get_testcat_by_percentile($percentile); $data['page_title'] = lang('edit_percentile'); $data['new_percentile'] = FALSE; $data['test'] = $test; $data['testcat'] = $testcat; $data['tests'] = $this->testModel->get_all_tests(); $data = add_fields($data, 'percentile', $percentile); $data['action'] = 'percentile/edit_submit/' . $percentile_id; $this->load->view('templates/header', $data); $this->load->view('percentile_edit_view', $data); $this->load->view('templates/footer'); }
/** Shows the welcome page with actions to change participants. */ public function welcome() { if (!$this->session->userdata('selfservice')) { flashdata(lang('selfservice_incorrect_url'), FALSE); redirect('selfservice'); } $participants = $this->participantModel->get_participants_by_email(current_email()); $first = $participants[0]; $data['page_title'] = lang('login'); $data['current_language'] = current_language(); $data['participants'] = $participants; $data['participant'] = $first; $data = add_fields($data, 'participant', $first); $this->load->view('templates/register_header', $data); $this->load->view('selfservice/welcome', $data); $this->load->view('templates/footer'); }
/** * * Specifies the contents of the register page * @param $language The language for this page */ public function register($language = L::English) { reset_language($language); $data['page_title'] = lang('reg_user'); $data['language'] = $language; $data['action'] = 'user/register_submit/' . $language; $data['new_user'] = TRUE; $data['referrer'] = $this->agent->referrer(); $data = add_fields($data, 'user'); $this->load->view('templates/header', $data); $this->load->view('user_edit_view', $data); $this->load->view('templates/footer'); }
/** Specifies the contents of the register page */ public function deregister($language = L::English) { reset_language($language); $data['page_title'] = lang('dereg_pp'); $data['action'] = $language === L::English ? '/deregister_submit/' : '/afmelden_versturen/'; $data['current_language'] = $language; $data = add_fields($data, 'participant'); // dob is a bit of a nasty one $data['dob'] = ''; $this->load->view('templates/register_header', $data); $this->load->view('participant_deregister', $data); $this->load->view('templates/footer'); }
$permissions_add = request_var('permissions', array(0 => array('' => ''))); $config_add = request_var('configs', array(0 => array('' => ''))); $permission_set = request_var('set_perms', array(0 => array('' => ''))); $column_add = request_var('columns', array(0 => array('' => ''))); $index_add = request_var('index', array(0 => array('' => ''))); $module_add = request_var('modules', array(0 => array('' => ''))); $table_add = request_var('table', array(0 => array('' => ''))); $table_keys = request_var('table_keys', array(0 => array('' => ''))); add_fields($permissions_add, 'permission_fields'); add_fields($config_add, 'config_fields'); add_fields($permission_set, 'set_perm_fields'); add_fields($module_add, 'module_fields'); add_fields($column_add, 'column_fields'); add_fields($index_add, 'index_fields'); add_fields($table_add, 'table_fields'); add_fields($table_keys, 'table_keys_fields'); } if ($submit) { if (!function_exists('validate_data')) { include $phpbb_root_path . 'includes/functions_user.' . $phpEx; } if (!isset($_REQUEST['ignore_errors'])) { $error = validate_data($mod, array('username' => array('string', false, MIN_FULLNAME_CHARS, MAX_FULLNAME_CHARS), 'fullname' => array('string', false, MIN_FULLNAME_CHARS, MAX_FULLNAME_CHARS), 'email' => array(array('string', true, MIN_EMAIL_CHARS, MAX_EMAIL_CHARS), array('generic_email')), 'filename' => array('match', false, '#^[a-z_\\.]{2,}$#'), 'version' => array('match', false, '#^([\\d\\.]{3,10})(-)?(dev|RC|a|b)?(\\d{0,2})?$#'), 'mod_name' => array('string', false, MIN_MOD_NAME_CHARS, MAX_MOD_NAME_CHARS), 'shortname' => array('match', false, '#^[a-z_]{' . MIN_MOD_NAME_CHARS . ',' . MAX_MOD_NAME_CHARS . '}$#'), 'copy_author' => array('string', false, MIN_FULLNAME_CHARS, MAX_FULLNAME_CHARS), 'lang_file' => array('match', false, '#^[a-z\\/_]+$#'))); // Replace "error" strings with their real, localised form $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); } } $template->assign_vars(array('AUTHOR_USERNAME' => $mod['username'], 'AUTHOR_FULLNAME' => $mod['fullname'], 'AUTHOR_EMAIL' => $mod['email'], 'GENERATION_TIMESTAMP' => $mod['filename'] . ' ' . $mod['version'] . ' ' . gmdate('Y-m-d H:i:sT') . ' ' . $mod['username'], 'COPYRIGHT_YEAR' => date('Y'), 'COPYRIGHT_AUTHOR' => $mod['copy_author'], 'LANG_FILE' => $mod['lang_file'], 'MOD_NAME' => $mod['mod_name'], 'MOD_VERSION' => $mod['version'], 'MOD_SHORT' => $mod['shortname'], 'MOD_CONFIG' => $mod['shortname'] . '_version', 'MOD_ENABLE' => $mod['shortname'] . '_enable', 'S_PURGE_CACHE' => isset($_REQUEST['purge_cache']) ? true : false)); foreach ($permissions_add as $key => $value) { if (!contains_data($value, 'name')) { continue;
/** * Define the metabox and field configurations. */ function touchpoints_register_metabox() { $prefix = 'wpcf-'; $activity_information = new_cmb2_box(array('id' => $prefix . 'group-activity-information', 'title' => __('Activity information', 'UkuuPeople'), 'object_types' => array('wp-type-activity'))); $actual_fields = array(0 => 'startdate', 1 => 'enddate', 2 => 'status', 3 => 'details', 4 => 'attachments'); add_fields($actual_fields, $activity_information); }
/** Completes a participation */ public function completed($participation_id, $pp_comment = '', $tech_comment = '') { $participation = $this->participationModel->get_participation_by_id($participation_id); $participant = $this->participationModel->get_participant_by_participation($participation_id); $experiment = $this->participationModel->get_experiment_by_participation($participation_id); $data['participation_id'] = $participation_id; $data['participant_name'] = name($participant); $data['participant'] = $participant; $data['experiment_name'] = $experiment->name; $data['experiment_id'] = $experiment->id; $data = add_fields($data, 'participation', $participation); // Empty the comments, so one can re-enter them at wish $data['pp_comment'] = $pp_comment; $data['tech_comment'] = $tech_comment; $this->load->view('templates/header', $data); $this->load->view('participation_complete', $data); $this->load->view('templates/footer'); }
/** Specifies the contents of the edit experiment page */ public function edit($experiment_id) { if (is_leader() && !$this->leaderModel->is_leader_for_experiment(current_user_id(), $experiment_id)) { show_error("You are not a leader for this experiment."); } $experiment = $this->experimentModel->get_experiment_by_id($experiment_id); $leaders = array_merge($this->userModel->get_all_leaders(), $this->userModel->get_all_admins()); $callers = $this->userModel->get_all_users(); $experiments = $this->experimentModel->get_all_experiments(TRUE, $experiment_id); $data['page_title'] = lang('edit_experiment'); $data['action'] = 'experiment/edit_submit/' . $experiment_id; $data = add_fields($data, 'experiment', $experiment); $data['date_start'] = output_date($experiment->date_start, TRUE); $data['date_end'] = output_date($experiment->date_end, TRUE); $data['locations'] = $this->locationModel->get_all_locations(); $data['callers'] = caller_options($callers); $data['leaders'] = leader_options($leaders); $data['experiments'] = experiment_options($experiments); $data['location_id'] = $this->locationModel->get_location_by_experiment($experiment)->id; $data['current_caller_ids'] = $this->callerModel->get_caller_ids_by_experiment($experiment_id); $data['current_leader_ids'] = $this->leaderModel->get_leader_ids_by_experiment($experiment_id); $data['current_prerequisite_ids'] = $this->relationModel->get_relation_ids_by_experiment($experiment_id, RelationType::Prerequisite); $data['current_exclude_ids'] = $this->relationModel->get_relation_ids_by_experiment($experiment_id, RelationType::Excludes); $data['current_combination_ids'] = $this->relationModel->get_relation_ids_by_experiment($experiment_id, RelationType::Combination); $this->load->view('templates/header', $data); $this->load->view('experiment_edit_view', $data); $this->load->view('templates/footer'); }
/** Specifies the contents of the edit result page */ public function edit($result_id) { $result = $this->resultModel->get_result_by_id($result_id); $data['page_title'] = lang('edit_result'); $data['action'] = 'result/edit_submit/' . $result_id; $data = add_fields($data, 'result', $result); $this->load->view('templates/header', $data); $this->load->view('result_edit_view', $data); $this->load->view('templates/footer'); }
/** Specifies the contents of the edit all scores for a test page TODO: does not work now */ public function edit_all($test_id = 0, $participant_id = 0) { $data['tests'] = $this->testModel->get_all_tests(); $data['participants'] = $this->participantModel->get_all_participants(TRUE); $data['page_title'] = lang('edit_all_scores'); $data['new_score'] = TRUE; $data['action'] = 'score/edit_all_submit'; $data = add_fields($data, 'score'); $data['test_id'] = $test_id; $data['participant_id'] = $participant_id; // $data['date'] = output_date(); TODO: find min date for possible scores $this->load->view('templates/header', $data); $this->load->view('score_edit_all_view', $data); $this->load->view('templates/footer'); }