Skip to content

Commit

Permalink
Reporting - Add link in user name - refs BT#19971
Browse files Browse the repository at this point in the history
  • Loading branch information
cfasanando committed Jun 7, 2022
1 parent 0964f8c commit fd6c539
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 7 additions & 2 deletions main/mySpace/myStudents.php
Expand Up @@ -709,8 +709,13 @@

// Actions bar
echo '<div class="actions">';
echo '<a href="javascript: window.history.go(-1);">'
.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
if ('session_report' === $origin) {
echo '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/progress_in_session_report.php">'
.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
} else {
echo '<a href="javascript: window.history.go(-1);">'
.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
}

echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'
.Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
Expand Down
8 changes: 7 additions & 1 deletion main/mySpace/progress_in_session_report.php
Expand Up @@ -112,8 +112,14 @@ function submitFrm(actionFrm, e) {

foreach ($accessSessionCourse as $access) {
$user = api_get_user_entity($access['user_id']);

$studentLink = Display::url(
UserManager::formatUserFullName($user),
api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$user->getId().'&origin=session_report'
);

$users[$user->getId()] = [
'complete_name' => UserManager::formatUserFullName($user),
'complete_name' => $studentLink,
'time_in_platform' => api_time_to_hms(
Tracking::get_time_spent_on_the_course($user->getId(), $access['c_id'], $sessionId, $startDate, $endDate)
),
Expand Down

0 comments on commit fd6c539

Please sign in to comment.