Compare commits

..

12 Commits

Author SHA1 Message Date
Marijn d3bb8d7c57 Fix question order (#99) 2026-05-16 13:33:44 +02:00
Marijn b799dfd5e5 Remove symlink 2026-05-10 10:43:33 +02:00
Marijn 86e7d07078 Actual hotfix 2026-05-09 17:21:04 +02:00
Marijn c68e865a78 Check for excel and ignore empty cells 2026-05-09 17:11:25 +02:00
dependabot[bot] ce799b62ae Bump phpoffice/phpspreadsheet in the composer group across 1 directory (#88)
Bumps the composer group with 1 update in the / directory: [phpoffice/phpspreadsheet](https://github.com/PHPOffice/PhpSpreadsheet).


Updates `phpoffice/phpspreadsheet` from 5.5.0 to 5.7.0
- [Release notes](https://github.com/PHPOffice/PhpSpreadsheet/releases)
- [Changelog](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHPOffice/PhpSpreadsheet/compare/5.5.0...5.7.0)

---
updated-dependencies:
- dependency-name: phpoffice/phpspreadsheet
  dependency-version: 5.7.0
  dependency-type: direct:production
  dependency-group: composer
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-01 09:43:49 +00:00
Marijn 4f02e63265 Disable Turbo (#87) 2026-05-01 09:42:00 +00:00
dependabot[bot] 826c8b2517 Bump symfony/console from 8.0.7 to 8.0.8 (#82)
Bumps [symfony/console](https://github.com/symfony/console) from 8.0.7 to 8.0.8.
- [Release notes](https://github.com/symfony/console/releases)
- [Changelog](https://github.com/symfony/console/blob/8.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/console/compare/v8.0.7...v8.0.8)

---
updated-dependencies:
- dependency-name: symfony/console
  dependency-version: 8.0.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-01 11:40:06 +02:00
dependabot[bot] 40d1e4076f Bump symfony/framework-bundle from 8.0.7 to 8.0.8 (#83)
Bumps [symfony/framework-bundle](https://github.com/symfony/framework-bundle) from 8.0.7 to 8.0.8.
- [Release notes](https://github.com/symfony/framework-bundle/releases)
- [Changelog](https://github.com/symfony/framework-bundle/blob/8.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/framework-bundle/compare/v8.0.7...v8.0.8)

---
updated-dependencies:
- dependency-name: symfony/framework-bundle
  dependency-version: 8.0.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-01 11:39:57 +02:00
dependabot[bot] 8c28025e7c Bump phpstan/phpstan from 2.1.42 to 2.1.46 (#85)
---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-version: 2.1.46
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-01 11:39:42 +02:00
dependabot[bot] 3775cb2f5c Bump rector/rector from 2.3.9 to 2.4.0 (#84)
Bumps [rector/rector](https://github.com/rectorphp/rector) from 2.3.9 to 2.4.0.
- [Release notes](https://github.com/rectorphp/rector/releases)
- [Commits](https://github.com/rectorphp/rector/compare/2.3.9...2.4.0)

---
updated-dependencies:
- dependency-name: rector/rector
  dependency-version: 2.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-01 11:39:33 +02:00
dependabot[bot] 40a436c829 Bump symfony/ux-turbo from 2.33.0 to 2.34.0 (#80)
Bumps [symfony/ux-turbo](https://github.com/symfony/ux-turbo) from 2.33.0 to 2.34.0.
- [Release notes](https://github.com/symfony/ux-turbo/releases)
- [Changelog](https://github.com/symfony/ux-turbo/blob/2.x/CHANGELOG.md)
- [Commits](https://github.com/symfony/ux-turbo/compare/v2.33.0...v2.34.0)

---
updated-dependencies:
- dependency-name: symfony/ux-turbo
  dependency-version: 2.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-01 11:39:15 +02:00
dependabot[bot] 194143602b Bump phpunit/phpunit in the composer group across 1 directory (#86)
Bumps the composer group with 1 update in the / directory: [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit).


Updates `phpunit/phpunit` from 13.0.5 to 13.1.6
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/13.1.6/ChangeLog-13.1.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/13.0.5...13.1.6)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 13.1.6
  dependency-type: direct:development
  dependency-group: composer
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-01 11:39:03 +02:00
9 changed files with 320 additions and 231 deletions
+13
View File
@@ -68,6 +68,19 @@ Icon
# Thumbnails # Thumbnails
._* ._*
# IDEs
/.idea/
/.vscode/
# Junie
!/.junie/
/.junie/memory/
/.junie/plans/
# Windows
Thumbs.db
Desktop.ini
# Files that might appear in the root of a volume # Files that might appear in the root of a volume
.DocumentRevisions-V100 .DocumentRevisions-V100
.fseventsd .fseventsd
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SqlDialectMappings">
<file url="PROJECT" dialect="PostgreSQL" />
</component>
</project>
+13
View File
@@ -61,6 +61,19 @@ The project uses `just` as the primary task runner. Always prefer `just` command
- CSS/Sass is in `assets/styles/`. - CSS/Sass is in `assets/styles/`.
- Assets are compiled on-the-fly or mapped; do not look for a `node_modules` folder. - Assets are compiled on-the-fly or mapped; do not look for a `node_modules` folder.
## Key Components
### Controllers
- **Backoffice**: Located in `src/Controller/Backoffice`, handles season and quiz management.
- **Quiz**: `src/Controller/QuizController` handles the candidate-facing side of quizzes.
- **Elimination**: `src/Controller/EliminationController` handles elimination screens.
### Services
- **QuizSpreadsheetService**: Handles importing quizzes from XLSX files.
### Base Classes & Enums
- **AbstractController**: Base class for all controllers, containing common regexes and flash helpers.
- **FlashType Enum**: Used for consistent flash messaging (`FlashType::Success`, `FlashType::Danger`, etc.).
## Key Files ## Key Files
- `composer.json`: Dependency management. - `composer.json`: Dependency management.
- `importmap.php`: JavaScript module mapping. - `importmap.php`: JavaScript module mapping.
+1 -1
View File
@@ -2,7 +2,7 @@
"controllers": { "controllers": {
"@symfony/ux-turbo": { "@symfony/ux-turbo": {
"turbo-core": { "turbo-core": {
"enabled": true, "enabled": false,
"fetch": "eager" "fetch": "eager"
}, },
"mercure-turbo-stream": { "mercure-turbo-stream": {
Generated
+273 -219
View File
File diff suppressed because it is too large Load Diff
+5
View File
@@ -8,6 +8,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Attribute\AsController; use Symfony\Component\HttpKernel\Attribute\AsController;
use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils; use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
use Tvdt\Enum\FlashType; use Tvdt\Enum\FlashType;
@@ -20,6 +21,10 @@ final class LoginController extends AbstractController
#[Route(path: '/login', name: 'tvdt_login_login')] #[Route(path: '/login', name: 'tvdt_login_login')]
public function login(): Response public function login(): Response
{ {
if ($this->getUser() instanceof UserInterface) {
return $this->redirectToRoute('tvdt_backoffice_index');
}
// get the login error if there is one // get the login error if there is one
$error = $this->authenticationUtils->getLastAuthenticationError(); $error = $this->authenticationUtils->getLastAuthenticationError();
// last username entered by the user // last username entered by the user
@@ -15,6 +15,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Mailer\Exception\TransportExceptionInterface; use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
use SymfonyCasts\Bundle\VerifyEmail\Exception\VerifyEmailExceptionInterface; use SymfonyCasts\Bundle\VerifyEmail\Exception\VerifyEmailExceptionInterface;
use Tvdt\Entity\User; use Tvdt\Entity\User;
@@ -30,6 +31,10 @@ final class RegistrationController extends AbstractController
public function register( public function register(
Request $request, Request $request,
): Response { ): Response {
if ($this->getUser() instanceof UserInterface) {
return $this->redirectToRoute('tvdt_backoffice_index');
}
$user = new User(); $user = new User();
$form = $this->createForm(RegistrationFormType::class, $user); $form = $this->createForm(RegistrationFormType::class, $user);
$form->handleRequest($request); $form->handleRequest($request);
+1
View File
@@ -30,6 +30,7 @@ class QuestionRepository extends ServiceEntityRepository
and q1.quiz = :quiz and q1.quiz = :quiz
) )
and qz = :quiz and qz = :quiz
order by q.ordering
DQL) DQL)
->setMaxResults(1) ->setMaxResults(1)
->setParameter('candidate', $candidate) ->setParameter('candidate', $candidate)
+9 -5
View File
@@ -95,11 +95,15 @@ class QuizSpreadsheetService
$arrCounter = 1; $arrCounter = 1;
while (true) { while (true) {
if (null === $questionArr[$arrCounter]) { try {
if (1 === $answerCounter) { if (null === $questionArr[$arrCounter]) {
$errors[] = \sprintf('Question %d has no answers', $answerCounter); if (1 === $answerCounter) {
} $errors[] = \sprintf('Question %d has no answers', $answerCounter);
}
break;
}
} catch (\ErrorException) {
break; break;
} }
@@ -130,6 +134,6 @@ class QuizSpreadsheetService
private function isSpreadsheetFile(File $file): bool private function isSpreadsheetFile(File $file): bool
{ {
return 'xlsx' === $file->getExtension(); return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' === $file->getMimeType();
} }
} }