Skip to content

Commit

Permalink
mental map repetition
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr Karachev committed Nov 2, 2024
1 parent 3b6dac9 commit d6ee572
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/modules/repetition/Testing/StudentRepetitionSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private function createMentalMapQuery(int $studentId): Query
return (new Query())
->select([
'id' => 't.uuid',
'header' => 't.name',
new Expression('t.name COLLATE utf8_general_ci AS header'),
'date' => $repetitionQuery,
'totalItems' => $scheduleTotalQuery,
'doneItems' => $repetitionDoneQuery,
Expand Down Expand Up @@ -93,7 +93,7 @@ private function createTestingQuery(int $studentId): Query
return (new Query())
->select([
'id' => 't.id',
'header' => 't.header',
new Expression('t.header COLLATE utf8_general_ci AS header'),
'date' => $repetitionQuery,
'totalItems' => $scheduleTotalQuery,
'doneItems' => $repetitionDoneQuery,
Expand All @@ -109,14 +109,14 @@ public function search(int $studentId): DataProviderInterface
$testingQuery = $this->createTestingQuery($studentId);
$mentalMapQuery = $this->createMentalMapQuery($studentId);

/*$query = (new Query())
$query = (new Query())
->select('t.*')
->from(['t' => $testingQuery->union($mentalMapQuery)])
->orderBy(['t.header' => SORT_ASC]);*/
->orderBy(['t.header' => SORT_ASC]);

return new SqlDataProvider([
'sql' => $testingQuery->createCommand()->getRawSql(),
'totalCount' => $testingQuery->count(),
'sql' => $query->createCommand()->getRawSql(),
'totalCount' => $query->count(),
'pagination' => false,
'sort' => [
'defaultOrder' => [
Expand Down

0 comments on commit d6ee572

Please sign in to comment.