diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index c18a6cefff..4f45336a24 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -708,11 +708,67 @@ input[type=checkbox], input[type=radio] { background-color: #FFFFFF; color: #252422; margin-bottom: 20px; - position: relative; - z-index: 1; border: 1px solid #e4e4e4; } +.card-body{ + padding: .5em 1em; + position: relative; + width: 100%; +} +.card-body .stat-widget-five{ + min-height: 60px; +} +.card-body .stat-widget-five .stat-icon{ + font-size: 35px; + line-height: 35px; + position: absolute; + left: 30px; + top: 20px; +} +.card-body .stat-widget-five .stat-icon .active-icon{ + position: absolute; + top: 15px; + bottom: 0; + left: -9px; +} +.card-body .stat-content{ + margin-left: 70px; +} +.card-body .stat-content .text-left{ + display: inline-block; +} +.card-body .stat-widget-five .stat-text { + color: #455a64; + font-size: 16px; +} +.card-body .stat-widget-five .stat-heading { + color: #99abb4; + font-size: 12px; +} +.box-widget .card-body .stat-widget-five{ + min-height: 45px; + text-align: center; + font-size:20px; +} +.box-widget .card-body .stat-widget-five .box-name{ + font-size: 12px; + color: #99abb4; +} +.box-widget .card-body .stat-widget-five span.date{ + font-size: 14px; + display: inline-block; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + width: 158px; +} +.box-widget .card-body{ + padding: 2px; + background: #1a3548; + color: #fff; +} + .card .content { padding: 15px 15px 10px 15px; } @@ -9956,9 +10012,29 @@ ul.dropdown-menu.inner > li > a { background-color: #fb5f0442 !important; color: #FF5722; } -.last-connection{ +.details .user .avatar, +.details .user .name, +.details .user .access +{ + text-align: center; +} +.details .user .name h3{ + font-size: 1.75rem; +} +.details .user .avatar .img-responsive{ + display:inline-block; +} +.details .user .parameters{ + margin-top: 1rem; + padding-top: 1rem; +} +.details .easypiechart-legend{ + text-align: center; +} +.details .easy-donut{ + padding-bottom: 10px; + margin-bottom: 10px; } - @media (min-width: 768px) { .clear-rows-6-4-3 .col-sm-6:nth-child(2n+1) { clear: left; diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index 3f5d977d64..8330bf181c 100755 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -13,6 +13,7 @@ use ChamiloSession as Session; require_once __DIR__.'/../inc/global.inc.php'; api_block_anonymous_users(); +$htmlHeadXtra[] = ''; $export = isset($_GET['export']) ? $_GET['export'] : false; $sessionId = isset($_GET['id_session']) ? (int) $_GET['id_session'] : 0; @@ -870,8 +871,8 @@ $userGroups = $userGroupManager->getNameListByUser( ); $userInfo = [ - 'id' => $user_info['user_id'], - 'complete_name' => $user_info['complete_name'], + 'id' => $user_info['user_id'], + 'complete_name' => $user_info['complete_name'], 'complete_name_link' => $user_info['complete_name_with_message_link'], 'phone' => $user_info['phone'], 'code' => $user_info['official_code'], @@ -885,186 +886,95 @@ $userInfo = [ 'avatar' => $userPicture, 'online' => $online ]; + +if (!empty($course_code)) { + $userInfo['url_access'] = Display::url( + get_lang('SeeAccesses'), + 'access_details.php?' + .http_build_query( + [ + 'student' => $student_id, + 'course' => $course_code, + 'origin' => $origin, + 'cidReq' => $course_code, + 'id_session' => $sessionId, + ] + ), + ['class' => 'btn btn-default'] + ); +} + + +// Display timezone if the user selected one and if the admin allows the use of user's timezone +$timezone = null; +$timezone_user = UserManager::get_extra_user_data_by_field( + $user_info['user_id'], + 'timezone' +); +$use_users_timezone = api_get_setting('use_users_timezone', 'timezones'); + if ($timezone_user['timezone'] != null && + $use_users_timezone == 'true' + ) { + $timezone = $timezone_user['timezone']; + } + if ($timezone !== null) { + $userInfo['timezone'] = $timezone; + } + + if (is_numeric($avg_student_score)) { + $score = $avg_student_score.'%'; + } else { + $score = $avg_student_score; + } + +$userInfo['student_score'] = $score; +$userInfo['student_progress'] = $avg_student_progress; +$userInfo['first_connection'] = $first_connection_date; +$userInfo['last_connection'] = $last_connection_date; +if ($details == 'true') { + $userInfo['time_spent_course'] = $time_spent_on_the_course; +} + +if (api_get_setting('allow_terms_conditions') === 'true') { + $isBoss = UserManager::userIsBossOfStudent(api_get_user_id(), $student_id); + if ($isBoss || api_is_platform_admin()) { + $extraFieldValue = new ExtraFieldValue('user'); + $value = $extraFieldValue->get_values_by_handler_and_field_variable( + $student_id, + 'legal_accept' + ); + $icon = Display::return_icon('accept_na.png'); + $legalTime = null; + + if (isset($value['value']) && !empty($value['value'])) { + list($legalId, $legalLanguageId, $legalTime) = explode(':', $value['value']); + $icon = Display::return_icon('accept.png'); + $btn = Display::url( + get_lang('DeleteLegal'), + api_get_self().'?action=delete_legal&student='.$student_id.'&course='.$course_code, + ['class' => 'btn btn-danger'] + ); + $timeLegalAccept = api_get_local_time($legalTime); + } else { + $btn = Display::url( + get_lang('SendLegal'), + api_get_self().'?action=send_legal&student='.$student_id.'&course='.$course_code, + ['class' => 'btn btn-primary'] + ); + $timeLegalAccept = get_lang('NotRegistered'); + } + } + $userInfo['legal'] = [ + 'icon' => $icon, + 'datetime' => $timeLegalAccept, + 'url_send' => $btn + ]; +} + ?>
| - | |
|---|---|
| - | - |
| - | - '.$user_info['email'].'' - : get_lang('NoEmail'); - ?> - | -
| - | - |
| - | - |
| - | - |
| - $student_id, - 'course' => $course_code, - 'origin' => $origin, - 'cidReq' => $course_code, - 'id_session' => $sessionId, - ] - ), - ['class' => 'btn btn-default'] - ); ?> - | -|
| - | |
| - | |
|---|---|
| - | - |
| - | - |
| - | - |
| - 'absmiddle', 'hspace' => '3px'] - ); ?> - | -- |
| - 'absmiddle', 'hspace' => '3px'] - ); ?> - | -- - | -
| '; - echo get_lang('LegalAccepted').' | '.$icon; - echo ' |
| '.get_lang('OtherTools').' | -|
|---|---|
| - | - |
| - | - |
| - | - |
| - | - |
| - | - |
| - | - |
{{ user.email }}
+{{ user.email }}
+