本文整理汇总了PHP中_is函数的典型用法代码示例。如果您正苦于以下问题:PHP _is函数的具体用法?PHP _is怎么用?PHP _is使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_is函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: content_change_with_level
function content_change_with_level($id)
{
if (_is('Subject Coordinator')) {
$curent_centre_subjects = $this->subject_Model->getSCSubjects($this->current_user->id, $this->selected_year_term_id, $this->current_centre_role->centre_id);
} else {
if (_is('Teacher')) {
$curent_centre_subjects = $this->subject_Model->getTeacherSubjects($this->current_user->id, $this->selected_year_term_id, $this->current_centre_role->centre_id, $id);
} else {
if (_is('Master Admin') and MASTER_FREE) {
$curent_centre_subjects = $this->subject_Model->getCenterSubjects(NULL);
} else {
$curent_centre_subjects = $this->subject_Model->getCenterSubjects($this->current_centre_role->centre_id);
}
}
}
$subject_ids = array(-1);
foreach ($curent_centre_subjects as $subject) {
$subject_ids[] = $subject->id;
}
$selected_level_slo = $this->Slo_model->getSloFromLevel($id, $this->selected_year_term_id, $subject_ids);
$new_selected_level_slo = array();
foreach ($curent_centre_subjects as $subject) {
$new_selected_level_slo[$subject->id]['subject_id'] = $subject->id;
$new_selected_level_slo[$subject->id]['subject_name'] = $subject->name;
$new_selected_level_slo[$subject->id]['slo'] = array();
}
if (!empty($selected_level_slo) && count($selected_level_slo) > 0) {
foreach ($selected_level_slo as $new) {
$new_selected_level_slo[$new->subject_id]['slo'][] = $new;
}
}
$this->data['selected_level_slos'] = $new_selected_level_slo;
$this->data['selected_level'] = $this->input->post('level_id');
$this->load->view('view_slo_print_part', $this->data);
}
示例2: index
public function index($perpage = 5, $offset = 0)
{
if ($this->input->is_ajax_request()) {
$perpage = $this->get_per_page();
$this->breadcrumb->append_crumb('Staff Work Profiles', site_url('leave/work_profile'));
$this->data['centres'] = $this->centre_model->getCentreList();
if (_is('Centre Admin')) {
$this->data['centre_id'] = $centre_id = $this->current_user->centre_id;
} elseif ($this->input->get('centre_id')) {
$this->data['centre_id'] = $centre_id = $this->input->get('centre_id');
} else {
$this->data['centre_id'] = $centre_id = 0;
}
$where = $centre_id == 0 ? array('active' => 1, 'id !=' => 1, 'id !=' => $this->current_user->id) : array('centre_id' => $centre_id, 'active' => 1, 'id !=' => 1, 'id !=' => $this->current_user->id);
$this->data['staffs'] = $this->user_model->select('id, first_name, last_name')->getWhere($where);
if ($this->input->get('staff_id')) {
$this->data['staff_id'] = $staff_id = $this->input->get('staff_id');
} else {
$this->data['staff_id'] = $staff_id = 0;
}
$this->data['from_date'] = $from_date = $this->input->get('from_date');
$this->data['to_date'] = $to_date = $this->input->get('to_date');
$total_work_profiles = $this->work_profile_model->get_filtered_work_profiles(NULL, NULL, TRUE);
$work_profiles = $this->work_profile_model->get_filtered_work_profiles($perpage, $offset);
$this->paginate($perpage, $total_work_profiles, "leave/work_profile/index/" . $perpage, 5);
$this->data['work_profiles'] = $work_profiles;
$this->load->view('work_profile/staff_work_profiles', $this->data);
} else {
$this->ims_template->build('parent_account/blank', $this->data);
}
}
示例3: getAllUsers
public function getAllUsers($type, $perpage, $page, $user_id, $name = '', $email = '', $rc_centers = '0', $role = '0')
{
$this->db->select('u.*,GROUP_CONCAT(DISTINCT rr.name) as role_name,GROUP_CONCAT(DISTINCT c.name) as center_name')->from('user as u')->join('user_role as ur', 'ur.user_id = u.id', "LEFT")->join('role as rr', 'rr.id = ur.role_id', "LEFT")->join('center as c', 'ur.center_id = c.id', "LEFT")->where('u.id !=', $user_id);
if (_is("RC Admin")) {
$this->db->where('ur.center_id', $this->session->userdata('origin_centre_id'));
} else {
if ($rc_centers != '0') {
$this->db->where('ur.center_id', $rc_centers);
}
}
if ($role != '0') {
$this->db->where('ur.role_id', $role);
}
if ($email != '') {
$this->db->like('u.email', $email);
}
if ($name != '') {
$this->db->where('(u.first_name LIKE \'%' . $name . '%\' OR u.last_name LIKE \'%' . $name . '%\' )', NULL, FALSE);
}
$this->db->group_by('u.id');
if ($perpage != 0 || $page != 0) {
$this->db->limit($perpage, ($page - 1) * $perpage);
}
$users = $this->db->get();
if ($type) {
return $users->result();
} else {
return $users->num_rows();
}
}
示例4: index
public function index($offset = 0)
{
if ($this->input->is_ajax_request()) {
$perpage = $this->get_per_page();
$module = 'subject';
if ($this->input->get('_sorting_field')) {
$sort = $this->sort_by($this->input->get('_sorting_field'), $module);
} else {
$sort = NULL;
}
if ($this->input->post('search_word') == '' || $this->input->post('search_word') || $this->input->post('search_word') == 0) {
$search = array();
$search_word = $this->input->post('search_word');
$this->session->set_userdata($module . '_search_word', $search_word);
$search['word'] = $search_word;
$search['fields'] = array('name', 'short_name');
$this->data['search'] = $search;
} elseif ($this->session->userdata($module . '_search_word')) {
$search = array();
$search_word = $this->session->userdata($module . '_search_word');
$search['word'] = $search_word;
$search['fields'] = array('name', 'short_name');
} else {
$search = NULL;
}
$sc_id = _is('Subject Coordinator') ? $this->current_user->id : 0;
$result = $this->Subject_model->getSubject($offset, $perpage, $sort, $search, $sc_id, $this->default_yearterm->id);
$subjects = $result['subjects'];
$subject_use_slos = $this->Subject_model->getSubjectInUseInslo();
$new_subject_use_slo = array();
foreach ($subject_use_slos as $subject_use_slo) {
$new_subject_use_slo[] = $subject_use_slo->subject_id;
}
$subject_use_sows = $this->Subject_model->getSubjectInUseInsow();
$new_subject_use_sow = array();
foreach ($subject_use_sows as $subject_use_sow) {
$new_subject_use_sow[] = $subject_use_sow->subject_id;
}
$subject_use_themes = $this->Subject_model->getSubjectInUseInTheme();
$new_subject_use_theme = array();
foreach ($subject_use_themes as $subject_use_theme) {
$new_subject_use_theme[] = $subject_use_theme->subject_id;
}
$subject_use_areas = $this->Subject_model->getSubjectInUseInArea();
$new_subject_use_area = array();
foreach ($subject_use_areas as $subject_use_area) {
$new_subject_use_area[] = $subject_use_area->subject_id;
}
$output = array_unique(array_merge($new_subject_use_sow, $new_subject_use_slo, $new_subject_use_theme, $new_subject_use_area));
$this->paginate($perpage, $result['total'], "subject/index", 3);
$this->data['subject_used'] = $output;
$this->data['subjects'] = $subjects;
$this->data['perpage'] = $perpage;
$this->data['sort'] = $sort;
$this->load->view('view_manage_subject', $this->data);
} else {
$this->ims_template->build('parent_account/blank', $this->data);
}
}
示例5: getallEvents
public function getallEvents($user_id)
{
$this->db->select('*');
if (!_is("GR Admin")) {
$this->db->where('create_id', $user_id);
}
$result = $this->db->get('events');
return $result;
}
示例6: index
function index()
{
if (_is("RC Admin")) {
$center = $this->session->userdata('current_centre_role')->center_id;
$this->data['center_name'] = $this->dashboard_model->get_centername($center);
$this->gr_template->build('rc_dashboard', $this->data);
} else {
// if (_is('GR Admin')) {
$this->gr_template->build('dashboard', $this->data);
}
// }
}
示例7: usermodule
function usermodule()
{
$roles = $this->relation_model->loadAllRoles();
if (_is("GR Admin")) {
$this->data['centers'] = $this->relation_model->loadAllCenters();
$this->data['center_id'] = $this->data['centers'][0]->id;
} else {
$currentcenter_role = $this->session->userdata('current_centre_role');
$this->data['center_id'] = $currentcenter_role->center_id;
$this->data['users'] = $this->relation_model->loadAllUsers($this->current_user->id, $this->data['center_id']);
}
$this->data['alertify_error'] = "";
$this->data['alertify_success'] = "";
$this->data['allusers'] = $this->relation_model->loadtotalUsers($this->current_user->id, $this->data['center_id']);
if ($this->input->post('center_id')) {
if ($this->input->post('userid')) {
if ($this->input->post('role_id')) {
$role_id = $this->input->post('role_id');
$this->data['alertify_success'] = "Role Added";
} else {
$role_id = NULL;
$this->data['alertify_success'] = "User Added";
}
if ($this->relation_model->adduserToRole($this->input->post('userid'), $role_id, $this->input->post('center_id'))) {
} else {
$this->data['alertify_success'] = '';
$this->data['alertify_error'] = "Failed to add";
}
} else {
$this->data['center_id'] = $this->input->post('center_id');
$this->data['allusers'] = $this->relation_model->loadtotalUsers($this->current_user->id, $this->data['center_id']);
$this->data['users'] = $this->relation_model->loadAllUsers($this->current_user->id, $this->input->post('center_id'));
$this->data['alertify_error'] = "Select User and Role to add";
}
$this->data['center_id'] = $this->input->post('center_id');
$this->data['allusers'] = $this->relation_model->loadtotalUsers($this->current_user->id, $this->data['center_id']);
$this->data['users'] = $this->relation_model->loadAllUsers($this->current_user->id, $this->input->post('center_id'));
} else {
$this->data['users'] = $this->relation_model->loadAllUsers($this->current_user->id, $this->data['center_id']);
}
// debug($this->data['users']);
$arrayrole = array();
foreach ($roles as $row) {
$aasignedusers = $this->relation_model->loadassignedUsers($row->id, $this->data['center_id']);
$role = array('role_name' => $row->name, 'id' => $row->id, 'assignedusers' => $aasignedusers);
array_push($arrayrole, $role);
}
$this->data['my_id'] = $this->current_user->id;
$this->data['roles'] = $arrayrole;
$this->gr_template->build('user_role', $this->data);
}
示例8: loadsingleblog
public function loadsingleblog($userid, $blog_id)
{
$data = null;
if (_is("GR Admin")) {
$this->db->select('*');
$data = $this->db->where('id', $blog_id)->get('blog')->row();
} else {
if (_can("Blog")) {
$this->db->select('*');
$data = $this->db->where('user_id', $userid)->where('id', $blog_id)->get('blog')->row();
}
}
return $data;
}
示例9: __construct
public function __construct()
{
parent::__construct();
/**
* Check for admin privilages
*/
if (!_is('Master Admin')) {
$this->_set_flashdata(lang('permission_denied'), 'error');
redirect(site_url('dashboard'));
}
/**
* Load inspect models
*/
$this->load->model(array('parent_activity_feed_inspect_model', 'parent_account/parent_account_model'));
}
示例10: _i
function _i($file, $var = "0")
{
global $b;
if ($var == 1) {
$what = "Dir: ";
} else {
$what = "File:";
}
$_file = preg_replace("#\\.\\.#Uis", "", $file);
if (_is($file)) {
$c .= _true . "<font color='green'><b>" . $what . "</b> " . $_file . "</font>" . $b;
} else {
$c .= _false . "<font color='red'><b>" . $what . "</b> " . $_file . "</font>" . $b;
}
return $c;
}
示例11: index
function index($offset = 0)
{
if ($this->input->is_ajax_request()) {
$perpage = $this->get_per_page();
$module = 'Parent';
//for sorting
if ($this->input->get('_sorting_field')) {
$sort = $this->sort_by($this->input->get('_sorting_field'), $module);
} else {
$sort = NULL;
}
//for searching
if ($this->input->post('search_word') == '' || $this->input->post('search_word') || $this->input->post('search_word') == 0) {
$search = array();
$search_word = trim($this->input->post('search_word'));
$search['word'] = $search_word;
$this->session->set_userdata($module . '_search_word', $search_word);
$search['words'] = explode(' ', $search_word);
$search['fields'] = array('first_name', 'last_name', 'username', 'email');
} elseif ($this->session->userdata($module . '_search_word')) {
$search = array();
$search_word = $this->session->userdata($module . '_search_word');
$search['word'] = $search_word;
$search['fields'] = array('first_name', 'last_name', 'username', 'email');
} else {
$search = NULL;
}
if (_is('Centre Admin')) {
$result = $this->parents_model->getparentForCentreAdmin($offset, $perpage, $sort, $search, $this->current_user->centre_id);
} else {
$result = $this->parents_model->getparent($offset, $perpage, $sort, $search);
}
$parents = $result['parents'];
$this->paginate($perpage, $result['total'], "parents/index", 3);
$this->data['total'] = $result['total'];
$this->data['parents'] = $parents;
$this->data['perpage'] = $perpage;
$this->data['search'] = $search;
$this->data['sort'] = $sort;
$this->load->view('view_parents', $this->data);
} else {
$this->ims_template->build('parent_account/blank', $this->data);
}
}
示例12: getBookingsEvents
public function getBookingsEvents($filters, $center = NULL)
{
if (_is("RC Admin")) {
$this->db->where('e.center_id', $center);
}
$this->db->select('e.*,c.name AS center_name, SUM(eo.attend) AS booked')->from('event_orders AS eo')->join('events AS e', 'e.id=eo.event_id', "RIGHT");
if (!$filters) {
$this->db->limit(10);
} else {
if ($filters['key'] != '') {
$this->db->like('e.name', $filters['key']);
$this->db->or_like('c.name', $filters['key']);
// $this->db->or_having('SUM(eo.attend)', $filters['key']);
}
if ($filters['center_id'] != '') {
$this->db->where('e.center_id', $filters['center_id']);
}
}
//
$this->db->join('center AS c', 'c.id=e.center_id');
$data = $this->db->order_by('e.added_date', "DESC")->group_by('e.id')->get()->result();
// debug($this->db->last_query());
return $data;
}
示例13: __construct
public function __construct()
{
parent::__construct();
$this->load->library('syraz_auth', IMS_DB_PREFIX . 'user');
/**-------------------------------------------
* set login mode to System. |
**-------------------------------------------
*
* Use login 'system' to set it to system login.
* By default it will use 'system' login
*
*/
$this->syraz_auth->set_login_mode('system');
if (!$this->syraz_auth->logged_in()) {
if ($this->input->is_ajax_request()) {
echo "<script type='text/javascript'>\$(function(){window.location='" . site_url('system') . "';});</script>";
exit;
} else {
redirect(site_url('system'));
}
}
$this->load->library('form_validation');
$this->load->model(array('admin_common_model'));
$this->data['current_user'] = $this->current_user = $this->admin_common_model->getCurrentUser($this->syraz_auth->user_id());
$current_roles = $this->admin_common_model->getUserRoles($this->current_user->id);
$user_key_roles = $this->admin_common_model->getKeyRoles($this->current_user->id);
$this->data['current_user_roles'] = $this->current_user->roles = array_merge($user_key_roles, $current_roles);
$this->data['key_roles'] = array(1, 4, 5);
/**/
$parent_portal_setting = $this->options_model->getOption('parent_portal_setting');
if (in_array('use_centre_logo_by_user_role', $parent_portal_setting)) {
$logo = isset($this->session->userdata('current_centre_role')->logo) && $this->session->userdata('current_centre_role')->logo && file_exists('./uploads/centre/' . $this->session->userdata('current_centre_role')->logo) ? base_url() . 'uploads/centre/' . $this->session->userdata('current_centre_role')->logo : base_url() . 'uploads/logo/' . $this->options_model->getOption('admin_logo');
} else {
$logo = base_url() . 'uploads/logo/' . $this->options_model->getOption('admin_logo');
}
$this->data['system_logo'] = $logo;
/**/
$user_language = $this->data['current_user']->language;
if (isset($user_language) && !empty($user_language)) {
$this->language = $user_language;
$this->lang->load(strtolower(get_class($this)), $this->language);
$this->lang->load($this->language, 'common/' . $this->language);
} else {
$this->load->model('options_model');
$language_setting = $this->options_model->getOption('language_setting');
if (isset($language_setting) && !empty($language_setting)) {
$this->language = $language_setting['language'];
$this->lang->load(strtolower(get_class($this)), $this->language);
$this->lang->load($this->language, 'common/' . $this->language);
} else {
$this->lang->load(strtolower(get_class($this)), $this->language);
$this->lang->load($this->language, 'common/' . $this->language);
}
}
global $current_language;
$current_language = $this->language;
$this->ims_template->enable_parser(FALSE)->set_theme('backend')->set_layout('default')->title("Staff's Portal")->set_partial('head')->set_partial('header_scroll')->set_partial('header')->set_partial('sidebar')->set_partial('footer');
$this->data['theme_path'] = 'themes/backend/';
// $this->output->enable_profiler(TRUE);
$this->form_validation->set_error_delimiters('<label generated="true" class="error">', '</label>');
$this->breadcrumb->append_crumb(lang('dashboard'), site_url('dashboard'), false);
if (!$this->session->userdata('current_centre_role')) {
$keyRoles = $this->admin_common_model->getKeyRoles($this->current_user->id);
$this->session->set_userdata('current_centre_role', $keyRoles[0]);
if (!empty($keyRoles)) {
} else {
$this->session->set_userdata('current_centre_role', $this->admin_common_model->getDefaultRole($this->current_user->id, $this->current_user->centre_id));
}
}
global $_current_centre_role;
$_current_centre_role = $this->current_centre_role = $this->session->userdata('current_centre_role');
if (!$this->current_centre_role) {
show_error('No roles defined for this user. Please contact system admin.');
}
$this->data['is_master_admin'] = $this->is_master_admin = $this->_is_master_admin();
global $_permissions;
$_permissions = $this->_permissions = $this->admin_common_model->getUserPermissions($this->current_centre_role->role_id);
$this->data['year_term_related_module'] = array('album', 'app_assignment', 'assessment', 'assessment_view', 'events', 'lesson_record', 'print_sow', 'progress_report', 'relations', 'slo', 'sow');
if ($this->_is('Teacher')) {
$role = 'Teacher';
$this->data['year_terms'] = $this->admin_common_model->getYearTerms($role);
$this->_check_year_term($this->data['year_terms']);
$default_id = $this->admin_common_model->get_default_id($role);
if ($this->_isProgressReport() || $this->_isAlbum()) {
$default_id = $this->admin_common_model->get_default_progress_id($role);
}
if (!empty($default_id)) {
$id = $default_id->id;
} else {
$de_id = $this->admin_common_model->get_default_id($role = '');
if ($this->_isProgressReport() || $this->_isAlbum()) {
$default_id = $this->admin_common_model->get_default_progress_id($role = '');
}
if (!empty($de_id)) {
$id = $de_id->id;
} else {
$d_id = $this->admin_common_model->get_max_id();
$id = $d_id->id;
}
}
//.........这里部分代码省略.........
示例14: base_url
?>
<?php
if (_is('Master Admin')) {
?>
<a title="Login as <?php
echo $user->first_name;
?>
" class="temp_user_login" user_id="<?php
echo $user->id;
?>
" href="javascript:void(0);"><img src="<?php
echo base_url($theme_path . '/images/icons/color/login.png');
?>
"/></a>
<?php
} elseif (_is('Centre Admin')) {
?>
<a <?php
echo $user->original_centre_id == $selected_centre_id ? 'class="temp_user_login" title="Login as ' . $user->first_name . '"' : ' style="opacity:0.6" title="You can\'t login to another centre\'s user"';
?>
user_id="<?php
echo $user->id;
?>
" href="javascript:void(0);"><img src="<?php
echo base_url($theme_path . '/images/icons/color/login.png');
?>
"/></a>
<?php
}
?>
</td>
示例15: print_consolidated_assessment
public function print_consolidated_assessment()
{
if (empty($_GET)) {
$this->_set_flashdata(lang('print_assessment_no_param'), 'error');
redirect(site_url('assessment_view'));
}
$subject_id = $this->input->get('subject_id', true);
$assessment_category_id = $this->input->get('assessment_category_id', true);
$_year_term = $this->selected_year_term_id;
$levels = $this->levels_model->getLevels();
if (empty($subject_id) && empty($assessment_category_id) && empty($_year_term)) {
$this->_set_flashdata(lang('print_assessment_invalid_param'), 'error');
redirect(site_url('assessment_view'));
}
$this->data['subject'] = $this->subject_model->getSubjectById($subject_id);
if (_is('Teacher')) {
$this->data['levels'] = $levels = $this->levels_model->getTeacherLevels($this->current_user->id, $_year_term, $this->current_centre_role->centre_id);
$in_level = pluck($levels, 'id');
} else {
if (_is('Level Coordinator')) {
$this->data['levels'] = $levels = $this->levels_model->getLCLevel($this->current_user->id, $_year_term);
$in_level = pluck($levels, 'id');
} else {
$this->data['levels'] = $levels = $this->assessment_view_model->order_by('sequence')->getWhere(array('archive' => 0), IMS_DB_PREFIX . 'level');
$in_level = NULL;
}
}
if (_is('Subject Coordinator')) {
$this->data['subjects'] = $this->subject_model->getSCSubjects($this->current_user->id, $_year_term, $this->current_centre_role->centre_id);
} else {
if (_is('Teacher')) {
$this->data['subjects'] = $this->subject_model->getTeacherSubjects($this->current_user->id, $_year_term, $this->current_centre_role->centre_id, 0);
} else {
if (_is('Master Admin') and MASTER_FREE) {
$this->data['subjects'] = $this->subject_model->getCenterSubjects(NULL);
} else {
$this->data['subjects'] = $this->subject_model->getCenterSubjects($this->current_centre_role->centre_id);
}
}
}
$this->data['rubric_groups'] = $this->assessment_view_model->order_by('sequence')->getWhere(array('subject_id' => $subject_id), IMS_DB_PREFIX . 'rubric_group');
$rubrics = $this->assessment_view_model->order_by('sequence')->getRubrics($subject_id);
$this->data['rubrics'] = array();
foreach ($rubrics as $rubric) {
$this->data['rubrics'][$rubric->rubric_group_id][] = $rubric;
}
$this->data['assessment_categories'] = $this->assessment_view_model->order_by('sequence')->getWhere(array('subject_id' => $subject_id), IMS_DB_PREFIX . 'assessment_category');
$this->data['assessments'] = $this->assessment_view_model->getAssessmentConLevel($subject_id, $assessment_category_id, $_year_term, $in_level);
$assessments_rubrics = $this->assessment_view_model->getRubricAssessment($subject_id);
$this->data['assessments_rubrics'] = array();
foreach ($assessments_rubrics as $assessments_rubric) {
$this->data['assessments_rubrics'][$assessments_rubric->assessment_id][] = $assessments_rubric;
}
$assessments_levels = $this->assessment_view_model->getLevelAssessment($subject_id);
$this->data['assessments_levels'] = array();
foreach ($assessments_levels as $assessments_level) {
$this->data['assessments_levels'][$assessments_level->assessment_id][] = $assessments_level;
}
$consolidate_assessment_rubric = $this->data['assessments_rubrics'];
$consolidate_assessment_levels = $this->data['assessments_levels'];
$consolidate_assessments = $this->data['assessments'];
$b = array();
if (isset($consolidate_assessments) && $consolidate_assessments) {
foreach ($consolidate_assessments as $assessment) {
if (isset($consolidate_assessment_levels[$assessment->id]) and count($consolidate_assessment_levels[$assessment->id]) > 0) {
foreach ($consolidate_assessment_levels[$assessment->id] as $assessments_level) {
$a = array();
$a[$assessments_level->name] = array();
$a[$assessments_level->name]['id'] = $assessment->id;
$a[$assessments_level->name]['name'] = $assessment->name;
$a[$assessments_level->name]['rubric'] = array();
if (isset($consolidate_assessment_rubric[$assessment->id]) and count($consolidate_assessment_rubric[$assessment->id]) > 0) {
$i = 0;
foreach ($consolidate_assessment_rubric[$assessment->id] as $assessments_rubric) {
$a[$assessments_level->name]['rubric'][$i] = $assessments_rubric->name . "<br>";
$i++;
}
}
if (array_key_exists($assessments_level->name, $b)) {
array_push($b[$assessments_level->name], $a);
} else {
$b[] = $a;
}
}
}
}
}
$printable = array();
foreach ($levels as $level) {
$printable[$level->name] = null;
}
if (!empty($b)) {
foreach ($b as $k => $v) {
$key = key($v);
$printable[$key][] = $v[$key];
}
}
$this->data['printable'] = array_filter($printable);
$this->data['all_year_term'] = $this->data['year_terms'];
$this->load->view('template/assessment_view_download', $this->data);
//.........这里部分代码省略.........