Skip to content

Commit

Permalink
XAPI: Fix query to list in student view
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Sep 2, 2021
1 parent 40385fa commit 23fcf3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugin/xapi/src/Entity/Repository/ToolLaunchRepository.php
Expand Up @@ -53,8 +53,9 @@ public function countByCourseAndSession(Course $course, Session $session = null,
}

if ($filteredForStudent) {
$qb->leftJoin(CLpItem::class, 'lpi', Join::WITH, 'tl.id = lpi.path')
->andWhere($qb->expr()->isNull('lpi.path'));
$qb->leftJoin(CLpItem::class, 'lpi', Join::WITH, 'tl.id = lpi.path AND tl.course = lpi.cId')
->andWhere($qb->expr()->eq('lpi.itemType', ':item_type'))
->setParameter('item_type', TOOL_XAPI);
}

$query = $qb->getQuery();
Expand Down

0 comments on commit 23fcf3a

Please sign in to comment.