skala
Julio Montoya 13 years ago
commit 3cab2a707e
  1. 5
      main/admin/access_url_check_user_session.php
  2. 10
      main/admin/resume_session.php

@ -29,13 +29,14 @@ $tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
$table_access_url_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); $table_access_url_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$url_id = api_get_current_access_url_id();
$action = $_GET['action']; $action = $_GET['action'];
switch($action) { switch($action) {
case 'add_user_to_url': case 'add_user_to_url':
$user_id = $_REQUEST['user_id']; $user_id = $_REQUEST['user_id'];
$result = UrlManager::add_user_to_url($user_id); $result = UrlManager::add_user_to_url($user_id, $url_id);
$user_info = api_get_user_info($user_id); $user_info = api_get_user_info($user_id);
if ($result) { if ($result) {
$message = Display::return_message(get_lang('UserAdded').' '.api_get_person_name($user_info['firstname'], $user_info['lastname']), 'confirm'); $message = Display::return_message(get_lang('UserAdded').' '.api_get_person_name($user_info['firstname'], $user_info['lastname']), 'confirm');
@ -54,7 +55,7 @@ $multiple_url_is_on = api_get_multiple_access_url();
$order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname'; $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname';
$session_list = SessionManager::get_sessions_list(); $session_list = SessionManager::get_sessions_list();
$url_id = api_get_current_access_url_id();
$html = ''; $html = '';
$show_users_with_problems = isset($_REQUEST['show_users_with_problems']) && $_REQUEST['show_users_with_problems'] == 1 ? true : false; $show_users_with_problems = isset($_REQUEST['show_users_with_problems']) && $_REQUEST['show_users_with_problems'] == 1 ? true : false;

@ -34,7 +34,7 @@ $tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_C
$tbl_session_category = Database::get_main_table(TABLE_MAIN_SESSION_CATEGORY); $tbl_session_category = Database::get_main_table(TABLE_MAIN_SESSION_CATEGORY);
$table_access_url_session = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); $table_access_url_session = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION);
$table_access_url_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); $table_access_url_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$id_session = (int)$_GET['id_session']; $id_session = (int)$_GET['id_session'];
@ -63,10 +63,13 @@ if (Database::num_rows($rs)>0) {
$action = $_GET['action']; $action = $_GET['action'];
$url_id = api_get_current_access_url_id();
switch($action) { switch($action) {
case 'add_user_to_url': case 'add_user_to_url':
$user_id = $_REQUEST['user_id']; $user_id = $_REQUEST['user_id'];
$result = UrlManager::add_user_to_url($user_id); $result = UrlManager::add_user_to_url($user_id, $url_id);
$user_info = api_get_user_info($user_id); $user_info = api_get_user_info($user_id);
if ($result) { if ($result) {
$message = Display::return_message(get_lang('UserAdded').' '.api_get_person_name($user_info['firstname'], $user_info['lastname']), 'confirm'); $message = Display::return_message(get_lang('UserAdded').' '.api_get_person_name($user_info['firstname'], $user_info['lastname']), 'confirm');
@ -308,8 +311,7 @@ if ($session['nbr_users']==0) {
} else { } else {
$order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname'; $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname';
if ($multiple_url_is_on) { if ($multiple_url_is_on) {
$url_id = api_get_current_access_url_id();
$sql = "SELECT u.user_id, lastname, firstname, username, access_url_id $sql = "SELECT u.user_id, lastname, firstname, username, access_url_id
FROM $tbl_user u FROM $tbl_user u
INNER JOIN $tbl_session_rel_user su INNER JOIN $tbl_session_rel_user su

Loading…
Cancel
Save