Skip to content

Commit f3f49dc

Browse files
committed
Add stats button in "user information" page.
1 parent 1b4653d commit f3f49dc

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

main/admin/user_information.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,12 @@
306306
$status = get_lang('CourseCoach');
307307
break;
308308
}
309-
$tools = '<a href="course_information.php?code='.$courseInfo['code'].'&id_session='.$id_session.'">'.
309+
310+
$tools = Display::url(
311+
Display::return_icon('statistics.gif', get_lang('Stats')),
312+
api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?details=true&student='.$userId.'&id_session='.$id_session.'&course='.$courseInfo['code']
313+
);
314+
$tools .= '&nbsp;<a href="course_information.php?code='.$courseInfo['code'].'&id_session='.$id_session.'">'.
310315
Display::return_icon('synthese_view.gif', get_lang('Overview')).'</a>'.
311316
'<a href="'.$courseInfo['course_public_url'].'?id_session='.$id_session.'">'.
312317
Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>';
@@ -415,7 +420,12 @@
415420
$courseCode = $courseInfo['code'];
416421
$courseToolInformation = null;
417422

418-
$tools = '<a href="course_information.php?code='.$courseCode.'">'.
423+
$tools = Display::url(
424+
Display::return_icon('statistics.gif', get_lang('Stats')),
425+
api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?details=true&student='.$userId.'&id_session=0&course='.$courseCode
426+
);
427+
428+
$tools .= '&nbsp;<a href="course_information.php?code='.$courseCode.'">'.
419429
Display::return_icon('synthese_view.gif', get_lang('Overview')).'</a>'.
420430
'<a href="'.$courseInfo['course_public_url'].'">'.
421431
Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>'.
@@ -427,10 +437,9 @@
427437
}
428438

429439
$timeSpent = api_time_to_hms(
430-
Tracking :: get_time_spent_on_the_course(
440+
Tracking::get_time_spent_on_the_course(
431441
$userId,
432-
$courseInfo['real_id'],
433-
0
442+
$courseInfo['real_id']
434443
)
435444
);
436445

0 commit comments

Comments
 (0)