本文整理汇总了PHP中SessionManager::get_sessions_admin方法的典型用法代码示例。如果您正苦于以下问题:PHP SessionManager::get_sessions_admin方法的具体用法?PHP SessionManager::get_sessions_admin怎么用?PHP SessionManager::get_sessions_admin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SessionManager
的用法示例。
在下文中一共展示了SessionManager::get_sessions_admin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: implode
}
if (empty($session_date)) {
$session_date_string = '-';
} else {
$session_date_string = implode(' ', $session_date);
}
$sessionUrl = api_get_path(WEB_CODE_PATH) . 'mySpace/course.php?session_id=' . $session['id'];
$result[] = array('name' => $session['name'], 'date' => $session_date_string, 'course_per_session' => $count_courses_in_session, 'student_per_session' => $count_users_in_session, 'details' => Display::url(Display::return_icon('2rightarrow.png'), $sessionUrl));
}
}
break;
case 'get_sessions':
$session_columns = SessionManager::getGridColumns($list_type);
$columns = $session_columns['simple_column_name'];
if ($list_type == 'simple') {
$result = SessionManager::get_sessions_admin(array('where' => $whereCondition, 'order' => "{$sidx} {$sord}", 'extra' => $extra_fields, 'limit' => "{$start} , {$limit}"), false);
} else {
$result = SessionManager::get_sessions_admin_complete(array('where' => $whereCondition, 'order' => "{$sidx} {$sord}", 'extra' => $extra_fields, 'limit' => "{$start} , {$limit}"));
}
break;
/*
$columns = array(
'name',
'nbr_courses',
'nbr_users',
'category_name',
'access_start_date',
'access_end_date',
'coach_name',
'session_active',
'visibility'
示例2: indexAction
//.........这里部分代码省略.........
break;
case 'get_user_skill_ranking':
$skill = new \Skill();
$count = $skill->get_user_list_skill_ranking_count();
break;
case 'get_work_user_list':
require_once api_get_path(SYS_CODE_PATH) . 'work/work.lib.php';
$work_id = $request->get('work_id');
//$_REQUEST['work_id'];
$count = get_count_work($work_id);
break;
case 'get_exercise_results':
$exercise_id = $request->get('exerciseId');
//$_REQUEST['exerciseId'];
$filter_by_user = $request->get('filter_by_user');
if (isset($filter_by_user) && !empty($filter_by_user)) {
$filter_user = intval($filter_by_user);
if ($where_condition == "") {
$where_condition .= " te.exe_user_id = '{$filter_user}'";
} else {
$where_condition .= " AND te.exe_user_id = '{$filter_user}'";
}
}
$count = \ExerciseLib::get_count_exam_results($exercise_id, $where_condition);
break;
case 'get_hotpotatoes_exercise_results':
$hotpot_path = $request->get('path');
//$_REQUEST['path'];
$count = \ExerciseLib::get_count_exam_hotpotatoes_results($hotpot_path);
break;
case 'get_sessions':
$list_type = $request->get('list_type');
if ($list_type == 'simple' || empty($list_type)) {
$count = \SessionManager::get_sessions_admin(array('where' => $where_condition, 'extra' => $extra_fields), true);
} else {
$count = \SessionManager::get_count_admin_complete(array('where' => $where_condition, 'extra' => $extra_fields));
}
break;
case 'get_extra_fields':
$obj = new \ExtraField($type);
$count = $obj->get_count();
break;
case 'get_extra_field_options':
$field_id = $request->get('field_id');
$obj = new \ExtraFieldOption($type);
$count = $obj->get_count_by_field_id($field_id);
break;
case 'get_timelines':
$obj = new \Timeline();
$count = $obj->get_count();
break;
case 'get_gradebooks':
$obj = new \Gradebook();
$count = $obj->get_count();
break;
case 'get_event_email_template':
$obj = new \EventEmailTemplate();
$count = $obj->get_count();
break;
case 'get_careers':
$obj = new \Career();
$count = $obj->get_count();
break;
case 'get_promotions':
$obj = new \Promotion();
$count = $obj->get_count();
示例3: implode
}
if (empty($session_date)) {
$session_date_string = '-';
} else {
$session_date_string = implode(' ', $session_date);
}
$sessionUrl = api_get_path(WEB_CODE_PATH) . 'mySpace/course.php?session_id=' . $session['id'];
$result[] = array('name' => $session['name'], 'date' => $session_date_string, 'course_per_session' => $count_courses_in_session, 'student_per_session' => $count_users_in_session, 'details' => Display::url(Display::return_icon('2rightarrow.gif'), $sessionUrl));
}
}
break;
case 'get_sessions':
$columns = array('name', 'nbr_courses', 'nbr_users', 'category_name', 'date_start', 'date_end', 'coach_name', 'session_active', 'visibility');
// Rename Category_name
$whereCondition = str_replace('category_name', 'sc.name', $whereCondition);
$result = SessionManager::get_sessions_admin(array('where' => $whereCondition, 'order' => "{$sidx} {$sord}", 'limit' => "{$start} , {$limit}"));
break;
case 'get_exercise_progress':
$sessionId = intval($_GET['session_id']);
$courseId = intval($_GET['course_id']);
$exerciseId = intval($_GET['exercise_id']);
$date_from = $_GET['date_from'];
$date_to = $_GET['date_to'];
$columns = array('session', 'exercise_id', 'quiz_title', 'username', 'lastname', 'firstname', 'time', 'question_id', 'question', 'description', 'answer', 'correct');
$result = Tracking::get_exercise_progress($sessionId, $courseId, $exerciseId, $date_from, $date_to, array('where' => $whereCondition, 'order' => "{$sidx} {$sord}", 'limit' => "{$start} , {$limit}"));
break;
case 'get_session_lp_progress':
$sessionId = 0;
if (!empty($_GET['session_id']) && !empty($_GET['course_id'])) {
$sessionId = intval($_GET['session_id']);
$courseId = intval($_GET['course_id']);
示例4: intval
<?php
/* For licensing terms, see /license.txt */
$user_id = intval($_REQUEST['user_id']);
$session_id = intval($_REQUEST['id_session']);
if (empty($user_id) && empty($session_id)) {
api_not_allowed(true);
}
SessionManager::protect_session_edit($session_id);
if (api_is_platform_admin()) {
$sessions = SessionManager::get_sessions_admin(array('order' => 'name'));
} else {
$sessions = SessionManager::get_sessions_by_general_coach(api_get_session_id());
}
$message = null;
$session_to_select = array();
foreach ($sessions as $session) {
if ($session_id != $session['id']) {
$session_to_select[$session['id']] = $session['name'];
}
}
$session_name = api_get_session_name($session_id);
$user_info = api_get_user_info($user_id);
//Check if user was already moved
$user_status = SessionManager::get_user_status_in_session($session_id, $user_id);
if (isset($user_status['moved_to']) && $user_status['moved_to'] != 0 || $user_status['moved_status'] == SessionManager::SESSION_CHANGE_USER_REASON_ENROLLMENT_ANNULATION) {
api_not_allowed(true);
}
$form = new FormValidator('change_user_session', 'post', api_get_self());
$form->addElement('hidden', 'user_id', $user_id);
$form->addElement('hidden', 'id_session', $session_id);