Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function findSnapshots(Exercise $objExercise, TrackEExercises $trackExe) |
||
27 | { |
||
28 | $qb = $this->createQueryBuilder('l'); |
||
29 | |||
30 | $qb->select(['l.imageFilename', 'l.createdAt']); |
||
31 | |||
32 | if (ONE_PER_PAGE == $objExercise->selectType()) { |
||
33 | $qb |
||
34 | ->addSelect(['qq.question AS log_level']) |
||
35 | ->leftJoin(CQuizQuestion::class, 'qq', Join::WITH, 'l.level = qq.iid'); |
||
36 | } |
||
37 | |||
38 | $query = $qb |
||
39 | ->andWhere( |
||
40 | $qb->expr()->eq('l.exe', $trackExe->getExeId()) |
||
41 | ) |
||
42 | ->addOrderBy('l.createdAt') |
||
43 | ->getQuery(); |
||
44 | |||
45 | return $query->getResult(); |
||
46 | } |
||
48 |