|
|
|
@ -96,7 +96,7 @@ if ($export) { |
|
|
|
|
$csv_content = []; |
|
|
|
|
$from_myspace = false; |
|
|
|
|
$this_section = SECTION_COURSES; |
|
|
|
|
if (isset($_GET['from']) && $_GET['from'] == 'myspace') { |
|
|
|
|
if (isset($_GET['from']) && $_GET['from'] === 'myspace') { |
|
|
|
|
$from_myspace = true; |
|
|
|
|
$this_section = SECTION_TRACKING; |
|
|
|
|
} |
|
|
|
@ -163,7 +163,7 @@ if (!empty($details)) { |
|
|
|
|
} else { |
|
|
|
|
if ($origin === 'resume_session') { |
|
|
|
|
$interbreadcrumb[] = [ |
|
|
|
|
'url' => "../session/session_list.php", |
|
|
|
|
'url' => '../session/session_list.php', |
|
|
|
|
'name' => get_lang('SessionList'), |
|
|
|
|
]; |
|
|
|
|
if (!empty($sessionId)) { |
|
|
|
@ -335,13 +335,6 @@ switch ($action) { |
|
|
|
|
$totalScore += $bestScore; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*$score = Tracking::get_avg_student_score( |
|
|
|
|
$user_info['user_id'], |
|
|
|
|
$courseCodeItem, |
|
|
|
|
[], |
|
|
|
|
$sId |
|
|
|
|
);*/ |
|
|
|
|
|
|
|
|
|
$progress = empty($progress) ? '0%' : $progress.'%'; |
|
|
|
|
$score = empty($bestScore) ? '0%' : $bestScore.'%'; |
|
|
|
|
|
|
|
|
@ -903,9 +896,7 @@ $timezone_user = UserManager::get_extra_user_data_by_field( |
|
|
|
|
'timezone' |
|
|
|
|
); |
|
|
|
|
$use_users_timezone = api_get_setting('use_users_timezone', 'timezones'); |
|
|
|
|
if ($timezone_user['timezone'] != null && |
|
|
|
|
$use_users_timezone == 'true' |
|
|
|
|
) { |
|
|
|
|
if ($timezone_user['timezone'] != null && $use_users_timezone === 'true') { |
|
|
|
|
$timezone = $timezone_user['timezone']; |
|
|
|
|
} |
|
|
|
|
if ($timezone !== null) { |
|
|
|
@ -941,28 +932,37 @@ if (api_get_setting('allow_terms_conditions') === 'true') { |
|
|
|
|
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'] |
|
|
|
|
); |
|
|
|
|
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'] |
|
|
|
|
); |
|
|
|
|
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, |
|
|
|
|
'icon' => $icon, |
|
|
|
|
'datetime' => $timeLegalAccept, |
|
|
|
|
'url_send' => $btn, |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$details = true; |
|
|
|
|
$tpl = new Template( |
|
|
|
|
'', |
|
|
|
|
false, |
|
|
|
|
false, |
|
|
|
|
false, |
|
|
|
|
false, |
|
|
|
|
false, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if (!empty($courseInfo)) { |
|
|
|
|
$nb_assignments = Tracking::count_student_assignments($student_id, $course_code, $sessionId); |
|
|
|
@ -971,6 +971,7 @@ if (!empty($courseInfo)) { |
|
|
|
|
$chat_last_connection = Tracking::chat_last_connection($student_id, $courseInfo['real_id'], $sessionId); |
|
|
|
|
$documents = Tracking::count_student_downloaded_documents($student_id, $courseInfo['real_id'], $sessionId); |
|
|
|
|
$uploaded_documents = Tracking::count_student_uploaded_documents($student_id, $course_code, $sessionId); |
|
|
|
|
$tpl->assign('title', $courseInfo['title']); |
|
|
|
|
|
|
|
|
|
$userInfo['tools'] = [ |
|
|
|
|
'tasks' => $nb_assignments, |
|
|
|
@ -984,13 +985,6 @@ if (!empty($courseInfo)) { |
|
|
|
|
$details = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$tpl = new Template('', |
|
|
|
|
false, |
|
|
|
|
false, |
|
|
|
|
false, |
|
|
|
|
false, |
|
|
|
|
false, |
|
|
|
|
false); |
|
|
|
|
$tpl->assign('user', $userInfo); |
|
|
|
|
$tpl->assign('details', $details); |
|
|
|
|
$templateName = $tpl->get_template('my_space/user_details.tpl'); |
|
|
|
@ -1015,38 +1009,26 @@ if ($allowAll) { |
|
|
|
|
$sessionId |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
echo '<br><br>'; |
|
|
|
|
|
|
|
|
|
?> |
|
|
|
|
<div class="row"> |
|
|
|
|
|
|
|
|
|
<div class="col-sm-5"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php if (!empty($userGroups)) { |
|
|
|
|
?> |
|
|
|
|
<table class="table table-striped table-hover"> |
|
|
|
|
<thead> |
|
|
|
|
<tr> |
|
|
|
|
<th><?php echo get_lang('Classes'); ?></th>
|
|
|
|
|
echo '<br /><br />'; |
|
|
|
|
echo '<div class="row"> |
|
|
|
|
<div class="col-sm-5">'; |
|
|
|
|
if (!empty($userGroups)) { |
|
|
|
|
echo '<table class="table table-striped table-hover"> |
|
|
|
|
<thead> |
|
|
|
|
<tr> |
|
|
|
|
<th>'; |
|
|
|
|
echo get_lang('Classes'); |
|
|
|
|
echo '</th> |
|
|
|
|
</tr> |
|
|
|
|
</thead> |
|
|
|
|
<tbody> |
|
|
|
|
<?php foreach ($userGroups as $class) { |
|
|
|
|
?> |
|
|
|
|
<tr> |
|
|
|
|
<td><?php echo $class; ?></td>
|
|
|
|
|
</tr> |
|
|
|
|
<?php |
|
|
|
|
} ?> |
|
|
|
|
</tbody> |
|
|
|
|
</table> |
|
|
|
|
<?php |
|
|
|
|
} ?> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<?php |
|
|
|
|
<tbody>'; |
|
|
|
|
foreach ($userGroups as $class) { |
|
|
|
|
echo '<tr><td>'.$class.'</td></tr>'; |
|
|
|
|
} |
|
|
|
|
echo '</tbody></table>'; |
|
|
|
|
} |
|
|
|
|
echo '</div></div>'; |
|
|
|
|
|
|
|
|
|
$exportCourseList = []; |
|
|
|
|
$lpIdList = []; |
|
|
|
@ -1369,8 +1351,8 @@ if (empty($details)) { |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
$timeCourse = null; |
|
|
|
|
if (Tracking::minimunTimeAvailable($session_id, $courseInfo['real_id'])) { |
|
|
|
|
$timeCourse = Tracking::getCalculateTime($student_id, $courseInfo['real_id'], $session_id); |
|
|
|
|
if (Tracking::minimunTimeAvailable($sessionId, $courseInfo['real_id'])) { |
|
|
|
|
$timeCourse = Tracking::getCalculateTime($student_id, $courseInfo['real_id'], $sessionId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($user_info['status'] != INVITEE) { |
|
|
|
@ -1417,7 +1399,7 @@ if (empty($details)) { |
|
|
|
|
/** @var CLpCategory $item */ |
|
|
|
|
foreach ($categories as $item) { |
|
|
|
|
$categoryId = $item->getId(); |
|
|
|
|
if (!learnpath::categoryIsVisibleForStudent($item, $userEntity)) { |
|
|
|
|
if (!learnpath::categoryIsVisibleForStudent($item, $userEntity, $courseInfo['real_id'], $sessionId)) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1538,9 +1520,9 @@ if (empty($details)) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($i % 2 == 0) { |
|
|
|
|
$css_class = "row_even"; |
|
|
|
|
$css_class = 'row_even'; |
|
|
|
|
} else { |
|
|
|
|
$css_class = "row_odd"; |
|
|
|
|
$css_class = 'row_odd'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$i++; |
|
|
|
@ -1745,14 +1727,14 @@ if (empty($details)) { |
|
|
|
|
echo '<td>'; |
|
|
|
|
|
|
|
|
|
$sql = 'SELECT exe_id FROM '.$tbl_stats_exercices.' |
|
|
|
|
WHERE |
|
|
|
|
exe_exo_id = "'.$exercise_id.'" AND |
|
|
|
|
exe_user_id ="'.$student_id.'" AND |
|
|
|
|
c_id = '.$courseInfo['real_id'].' AND |
|
|
|
|
session_id = "'.$sessionId.'" AND |
|
|
|
|
status = "" |
|
|
|
|
ORDER BY exe_date DESC |
|
|
|
|
LIMIT 1'; |
|
|
|
|
WHERE |
|
|
|
|
exe_exo_id = "'.$exercise_id.'" AND |
|
|
|
|
exe_user_id ="'.$student_id.'" AND |
|
|
|
|
c_id = '.$courseInfo['real_id'].' AND |
|
|
|
|
session_id = "'.$sessionId.'" AND |
|
|
|
|
status = "" |
|
|
|
|
ORDER BY exe_date DESC |
|
|
|
|
LIMIT 1'; |
|
|
|
|
$result_last_attempt = Database::query($sql); |
|
|
|
|
if (Database::num_rows($result_last_attempt) > 0) { |
|
|
|
|
$id_last_attempt = Database::result($result_last_attempt, 0, 0); |
|
|
|
|