XAPI: Fix query to list in student view

pull/3973/head
Angel Fernando Quiroz Campos 4 years ago
parent 40385fa5bc
commit 23fcf3a3a0
  1. 5
      plugin/xapi/src/Entity/Repository/ToolLaunchRepository.php

@ -53,8 +53,9 @@ class ToolLaunchRepository extends EntityRepository
}
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();

Loading…
Cancel
Save