|
|
|
|
@ -1,8 +1,9 @@ |
|
|
|
|
<?php |
|
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @package chamilo.admin |
|
|
|
|
*/ |
|
|
|
|
* @package chamilo.admin |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
$cidReset = true; |
|
|
|
|
|
|
|
|
|
@ -15,16 +16,24 @@ $xajax->registerFunction('search_users'); |
|
|
|
|
|
|
|
|
|
// setting the section (for the tabs) |
|
|
|
|
$this_section = SECTION_PLATFORM_ADMIN; |
|
|
|
|
|
|
|
|
|
$id_session = intval($_GET['id_session']); |
|
|
|
|
|
|
|
|
|
SessionManager::protect_teacher_session_edit($id_session); |
|
|
|
|
|
|
|
|
|
// setting breadcrumbs |
|
|
|
|
if (api_is_platform_admin()) { |
|
|
|
|
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
|
|
|
$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
|
|
|
$interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$id_session, "name" => get_lang('SessionOverview')); |
|
|
|
|
$interbreadcrumb[] = array( |
|
|
|
|
'url' => 'index.php', |
|
|
|
|
'name' => get_lang('PlatformAdmin') |
|
|
|
|
); |
|
|
|
|
$interbreadcrumb[] = array( |
|
|
|
|
'url' => 'session_list.php', |
|
|
|
|
'name' => get_lang('SessionList') |
|
|
|
|
); |
|
|
|
|
$interbreadcrumb[] = array( |
|
|
|
|
'url' => "resume_session.php?id_session=".$id_session, |
|
|
|
|
"name" => get_lang('SessionOverview') |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
$allowTutors = api_get_setting('allow_tutors_to_assign_students_to_session'); |
|
|
|
|
$extra_field_list = []; |
|
|
|
|
@ -64,15 +73,12 @@ if ($allowTutors == 'true') { |
|
|
|
|
function search_users($needle, $type) |
|
|
|
|
{ |
|
|
|
|
global $id_session; |
|
|
|
|
|
|
|
|
|
$tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
|
|
|
|
$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER); |
|
|
|
|
|
|
|
|
|
$xajax_response = new xajaxResponse(); |
|
|
|
|
$return = ''; |
|
|
|
|
|
|
|
|
|
if (!empty($needle) && !empty($type)) { |
|
|
|
|
|
|
|
|
|
//normal behaviour |
|
|
|
|
if ($type == 'any_session' && $needle == 'false') { |
|
|
|
|
$type = 'multiple'; |
|
|
|
|
@ -164,7 +170,7 @@ if ($allowTutors == 'true') { |
|
|
|
|
'.(api_sort_by_first_name() ? 'firstname' : 'lastname').' LIKE "'.$needle.'%" AND user.status<>'.DRH.' AND user.status<>6 '.$cond_user_id. |
|
|
|
|
$order_clause; |
|
|
|
|
break; |
|
|
|
|
case 'any_session' : |
|
|
|
|
case 'any_session': |
|
|
|
|
$sql = 'SELECT DISTINCT user.user_id, username, lastname, firstname |
|
|
|
|
FROM '.$tbl_user.' user |
|
|
|
|
LEFT OUTER JOIN '.$tbl_session_rel_user.' s |
|
|
|
|
@ -210,14 +216,13 @@ if ($allowTutors == 'true') { |
|
|
|
|
return $xajax_response; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$xajax -> processRequests(); |
|
|
|
|
$xajax->processRequests(); |
|
|
|
|
|
|
|
|
|
$htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/'); |
|
|
|
|
$htmlHeadXtra[] = '<script> |
|
|
|
|
function add_user_to_session (code, content) { |
|
|
|
|
document.getElementById("user_to_add").value = ""; |
|
|
|
|
document.getElementById("ajax_list_users_single").innerHTML = ""; |
|
|
|
|
|
|
|
|
|
destination = document.getElementById("destination_users"); |
|
|
|
|
|
|
|
|
|
for (i=0;i<destination.length;i++) { |
|
|
|
|
|