XAPI: Fix query to list in student view

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

@ -53,9 +53,14 @@ class ToolLaunchRepository extends EntityRepository
}
if ($filteredForStudent) {
$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);
$qb
->leftJoin(
CLpItem::class,
'lpi',
Join::WITH,
"tl.id = lpi.path AND tl.course = lpi.cId AND lpi.itemType = 'xapi'"
)
->andWhere($qb->expr()->isNull('lpi.path'));
}
$query = $qb->getQuery();

Loading…
Cancel
Save