From f75fb86fc47eb0aa7438bf30e9c42730b4122485 Mon Sep 17 00:00:00 2001
From: Julio Montoya '.Display :: encrypted_mailto_link($user['mail'], $user['mail']).' '.get_lang('SessionList').'';
$id_session = intval($_GET['id_session']);
$table = new SortableTableFromArray(get_course_usage($course->code,$id_session),0,20,'usage_table');
@@ -89,12 +88,10 @@ $table->set_other_tables(array('user_table','class_table'));
$table->set_header(0,get_lang('Tool'), true);
$table->set_header(1,get_lang('NumberOfItems'), true);
$table->display();
-echo '
';
/**
* Show all users subscribed in this course
*/
echo ''.get_lang('Users').'
';
-echo '';
$table_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER);
$table_user = Database :: get_main_table(TABLE_MAIN_USER);
$sql = "SELECT *,cu.status as course_status FROM $table_course_user cu, $table_user u WHERE cu.user_id = u.user_id AND cu.course_code = '".$code."' AND cu.relation_type <> ".COURSE_RELATION_TYPE_RRHH." ";
@@ -139,12 +136,9 @@ if (Database::num_rows($res) > 0)
$table->set_header(4,get_lang('Status'), true);
$table->set_header(5,'', false);
$table->display();
-}
-else
-{
+} else {
echo get_lang('NoUsersInCourse');
}
-echo '
';
/*@todo This should be dissapear classes are a deprecated feature*/
/**
diff --git a/main/admin/user_information.php b/main/admin/user_information.php
old mode 100755
new mode 100644
index 3a9b7703a9..35c2cf4747
--- a/main/admin/user_information.php
+++ b/main/admin/user_information.php
@@ -15,12 +15,13 @@ api_protect_admin_script();
$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array ("url" => 'user_list.php', "name" => get_lang('UserList'));
-if ( ! isset($_GET['user_id'])) {
+if (!isset($_GET['user_id'])) {
api_not_allowed();
}
$user = api_get_user_info($_GET['user_id']);
$tool_name = api_get_person_name($user['firstName'], $user['lastName']).(empty($user['official_code'])?'':' ('.$user['official_code'].')');
Display::display_header($tool_name);
+
$table_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER);
$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
if ( isset($_GET['action']) ) {
@@ -35,14 +36,15 @@ if ( isset($_GET['action']) ) {
break;
}
}
-api_display_tool_title($tool_name);
//only allow platform admins to login_as, or session admins only for students (not teachers nor other admins)
$statusname = api_get_status_langvars();
$login_as_icon = '';
if (api_is_platform_admin() || (api_is_session_admin() && $row['6'] == $statusname[STUDENT])) {
$login_as_icon = ''.Display::return_icon('login_as.gif', get_lang('LoginAs')).'';
}
-echo '';
+echo '
'.get_lang('SessionList').'
'.get_lang('NoSessionsForThisUser').'
'; } -echo ''; /** * Show the courses in which this user is subscribed @@ -187,10 +174,8 @@ if (Database::num_rows($res) > 0) { $data[] = $row; } - echo ''.get_lang('Courses').'
'; - echo ''; - Display :: display_sortable_table($header, $data, array (), array (), array ('user_id' => intval($_GET['user_id']))); - echo ''; + echo '
'.get_lang('NoCoursesForThisUser').'
'; } @@ -238,13 +223,12 @@ if ($_configuration['multiple_access_urls']) { $row[] = $url['url']; $data[] = $row; } - echo ''.get_lang('URLList').'
'; - echo ''; - Display :: display_sortable_table($header, $data, array (), array (), array ('user_id' => intval($_GET['user_id']))); - echo ''; + echo '
'.get_lang('URLList').'
'; + Display :: display_sortable_table($header, $data, array (), array (), array ('user_id' => intval($_GET['user_id']))); } else { echo ''.get_lang('NoUrlForThisUser').'
'; } } + /* FOOTER */ Display::display_footer(); \ No newline at end of file