Skip to content

Commit

Permalink
xAPI: Add image to indicate session-specific resource - refs BT#18403
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Mar 18, 2021
1 parent a7471ce commit c78ebf7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugin/xapi/start.php
Expand Up @@ -17,6 +17,7 @@

$course = api_get_course_entity();
$session = api_get_session_entity();
$userInfo = api_get_user_info();

$cidReq = api_get_cidreq();

Expand Down Expand Up @@ -56,11 +57,16 @@ function ($start, $limit, $orderBy, $orderDir) use ($em, $course, $session, $isA
$table->set_header(0, $plugin->get_lang('ActivityTitle'), true);
$table->set_column_filter(
0,
function (array $toolInfo) use ($cidReq) {
function (array $toolInfo) use ($cidReq, $session, $userInfo) {
list($id, $title, $description, $ativityType) = $toolInfo;

$sessionStar = api_get_session_image(
$session ? $session->getId() : 0,
$userInfo['status']
);

$data = Display::url(
$title,
$title.$sessionStar,
('cmi5' === $ativityType ? 'cmi5/view.php' : 'tincan/view.php')."?id=$id&$cidReq",
['class' => 'show']
);
Expand Down

0 comments on commit c78ebf7

Please sign in to comment.