mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-05 15:10:16 +02:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 03425024fe | |||
| 182353e2eb | |||
| 9badb1d875 | |||
| df37faa5a3 | |||
| 7ec052b0a1 | |||
| f90fb00547 | |||
| aa39db3f5e | |||
| 55bbe962c1 | |||
| d3bb8d7c57 | |||
| b799dfd5e5 | |||
| 86e7d07078 |
+16
-1
@@ -7,9 +7,24 @@ version: 2
|
|||||||
updates:
|
updates:
|
||||||
- package-ecosystem: "composer" # See documentation for possible values
|
- package-ecosystem: "composer" # See documentation for possible values
|
||||||
directory: "/" # Location of package manifests
|
directory: "/" # Location of package manifests
|
||||||
|
allow:
|
||||||
|
# Allow both direct and indirect updates for all packages
|
||||||
|
- dependency-type: "all"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "symfony/*"
|
||||||
|
update-types: [ "version-update:semver-major", "version-update:semver-minor" ]
|
||||||
|
groups:
|
||||||
|
dev-dependencies:
|
||||||
|
dependency-type: "development"
|
||||||
|
symfony:
|
||||||
|
patterns:
|
||||||
|
- "symfony/*"
|
||||||
|
twig:
|
||||||
|
patterns:
|
||||||
|
- "twig/*"
|
||||||
- package-ecosystem: "docker"
|
- package-ecosystem: "docker"
|
||||||
directtory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
name: Dependabot auto-merge
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dependabot:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.pull_request.user.login == 'dependabot[bot]'
|
||||||
|
steps:
|
||||||
|
- name: Dependabot metadata
|
||||||
|
id: metadata
|
||||||
|
uses: dependabot/fetch-metadata@v2
|
||||||
|
with:
|
||||||
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
- name: Enable auto-merge for Dependabot PRs
|
||||||
|
if: contains(steps.metadata.outputs.dependency-type, 'development')
|
||||||
|
run: |
|
||||||
|
gh pr review --approve "$PR_URL"
|
||||||
|
gh pr merge --auto --squash "$PR_URL"
|
||||||
|
env:
|
||||||
|
PR_URL: ${{github.event.pull_request.html_url}}
|
||||||
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
+13
@@ -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
|
||||||
|
|||||||
Generated
+1
@@ -165,6 +165,7 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/dama/doctrine-test-bundle" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/dama/doctrine-test-bundle" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/gedmo/doctrine-extensions" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/gedmo/doctrine-extensions" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/stof/doctrine-extensions-bundle" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/stof/doctrine-extensions-bundle" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/git-state" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
|||||||
Generated
+3
@@ -200,6 +200,9 @@
|
|||||||
<path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
|
<path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
|
||||||
<path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
|
<path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
|
||||||
<path value="$PROJECT_DIR$/vendor/egulias/email-validator" />
|
<path value="$PROJECT_DIR$/vendor/egulias/email-validator" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php84" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php85" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/sebastian/git-state" />
|
||||||
</include_path>
|
</include_path>
|
||||||
</component>
|
</component>
|
||||||
<component name="PhpInterpreters">
|
<component name="PhpInterpreters">
|
||||||
|
|||||||
@@ -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 +0,0 @@
|
|||||||
AGENTS.md
|
|
||||||
+1
-1
@@ -37,7 +37,7 @@
|
|||||||
"symfony/translation": "8.0.*",
|
"symfony/translation": "8.0.*",
|
||||||
"symfony/twig-bundle": "8.0.*",
|
"symfony/twig-bundle": "8.0.*",
|
||||||
"symfony/uid": "8.0.*",
|
"symfony/uid": "8.0.*",
|
||||||
"symfony/ux-turbo": "^2.33.0",
|
"symfony/ux-turbo": "^2.35.0",
|
||||||
"symfony/validator": "8.0.*",
|
"symfony/validator": "8.0.*",
|
||||||
"symfony/yaml": "8.0.*",
|
"symfony/yaml": "8.0.*",
|
||||||
"symfonycasts/sass-bundle": "^0.9",
|
"symfonycasts/sass-bundle": "^0.9",
|
||||||
|
|||||||
Generated
+609
-508
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,9 @@ security:
|
|||||||
default_target_path: tvdt_backoffice_index
|
default_target_path: tvdt_backoffice_index
|
||||||
logout:
|
logout:
|
||||||
path: tvdt_login_logout
|
path: tvdt_login_logout
|
||||||
|
remember_me:
|
||||||
|
secret: '%kernel.secret%'
|
||||||
|
lifetime: 604800 # 1 week in seconds
|
||||||
|
|
||||||
access_control:
|
access_control:
|
||||||
- { path: ^/admin, roles: ROLE_ADMIN }
|
- { path: ^/admin, roles: ROLE_ADMIN }
|
||||||
|
|||||||
Generated
+49
-49
@@ -128,7 +128,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* @psalm-type FrameworkConfig = array{
|
* @psalm-type FrameworkConfig = array{
|
||||||
* secret?: scalar|Param|null,
|
* secret?: scalar|Param|null,
|
||||||
* http_method_override?: bool|Param, // Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. // Default: false
|
* http_method_override?: bool|Param, // Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. // Default: false
|
||||||
* allowed_http_method_override?: list<string|Param>|null,
|
* allowed_http_method_override?: null|list<string|Param>,
|
||||||
* trust_x_sendfile_type_header?: scalar|Param|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%"
|
* trust_x_sendfile_type_header?: scalar|Param|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%"
|
||||||
* ide?: scalar|Param|null, // Default: "%env(default::SYMFONY_IDE)%"
|
* ide?: scalar|Param|null, // Default: "%env(default::SYMFONY_IDE)%"
|
||||||
* test?: bool|Param,
|
* test?: bool|Param,
|
||||||
@@ -136,9 +136,9 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* set_locale_from_accept_language?: bool|Param, // Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed). // Default: false
|
* set_locale_from_accept_language?: bool|Param, // Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed). // Default: false
|
||||||
* set_content_language_from_locale?: bool|Param, // Whether to set the Content-Language HTTP header on the Response using the Request locale. // Default: false
|
* set_content_language_from_locale?: bool|Param, // Whether to set the Content-Language HTTP header on the Response using the Request locale. // Default: false
|
||||||
* enabled_locales?: list<scalar|Param|null>,
|
* enabled_locales?: list<scalar|Param|null>,
|
||||||
* trusted_hosts?: list<scalar|Param|null>,
|
* trusted_hosts?: string|list<scalar|Param|null>,
|
||||||
* trusted_proxies?: mixed, // Default: ["%env(default::SYMFONY_TRUSTED_PROXIES)%"]
|
* trusted_proxies?: mixed, // Default: ["%env(default::SYMFONY_TRUSTED_PROXIES)%"]
|
||||||
* trusted_headers?: list<scalar|Param|null>,
|
* trusted_headers?: string|list<scalar|Param|null>,
|
||||||
* error_controller?: scalar|Param|null, // Default: "error_controller"
|
* error_controller?: scalar|Param|null, // Default: "error_controller"
|
||||||
* handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true
|
* handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true
|
||||||
* csrf_protection?: bool|array{
|
* csrf_protection?: bool|array{
|
||||||
@@ -202,23 +202,23 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* property?: scalar|Param|null,
|
* property?: scalar|Param|null,
|
||||||
* service?: scalar|Param|null,
|
* service?: scalar|Param|null,
|
||||||
* },
|
* },
|
||||||
* supports?: list<scalar|Param|null>,
|
* supports?: string|list<scalar|Param|null>,
|
||||||
* definition_validators?: list<scalar|Param|null>,
|
* definition_validators?: list<scalar|Param|null>,
|
||||||
* support_strategy?: scalar|Param|null,
|
* support_strategy?: scalar|Param|null,
|
||||||
* initial_marking?: list<scalar|Param|null>,
|
* initial_marking?: \BackedEnum|string|list<scalar|Param|null>,
|
||||||
* events_to_dispatch?: list<string|Param>|null,
|
* events_to_dispatch?: null|list<string|Param>,
|
||||||
* places?: list<array{ // Default: []
|
* places?: string|list<array{ // Default: []
|
||||||
* name?: scalar|Param|null,
|
* name?: scalar|Param|null,
|
||||||
* metadata?: array<string, mixed>,
|
* metadata?: array<string, mixed>,
|
||||||
* }>,
|
* }>,
|
||||||
* transitions?: list<array{ // Default: []
|
* transitions?: list<array{ // Default: []
|
||||||
* name?: string|Param,
|
* name?: string|Param,
|
||||||
* guard?: string|Param, // An expression to block the transition.
|
* guard?: string|Param, // An expression to block the transition.
|
||||||
* from?: list<array{ // Default: []
|
* from?: \BackedEnum|string|list<array{ // Default: []
|
||||||
* place?: string|Param,
|
* place?: string|Param,
|
||||||
* weight?: int|Param, // Default: 1
|
* weight?: int|Param, // Default: 1
|
||||||
* }>,
|
* }>,
|
||||||
* to?: list<array{ // Default: []
|
* to?: \BackedEnum|string|list<array{ // Default: []
|
||||||
* place?: string|Param,
|
* place?: string|Param,
|
||||||
* weight?: int|Param, // Default: 1
|
* weight?: int|Param, // Default: 1
|
||||||
* }>,
|
* }>,
|
||||||
@@ -268,7 +268,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* version_format?: scalar|Param|null, // Default: "%%s?%%s"
|
* version_format?: scalar|Param|null, // Default: "%%s?%%s"
|
||||||
* json_manifest_path?: scalar|Param|null, // Default: null
|
* json_manifest_path?: scalar|Param|null, // Default: null
|
||||||
* base_path?: scalar|Param|null, // Default: ""
|
* base_path?: scalar|Param|null, // Default: ""
|
||||||
* base_urls?: list<scalar|Param|null>,
|
* base_urls?: string|list<scalar|Param|null>,
|
||||||
* packages?: array<string, array{ // Default: []
|
* packages?: array<string, array{ // Default: []
|
||||||
* strict_mode?: bool|Param, // Throw an exception if an entry is missing from the manifest.json. // Default: false
|
* strict_mode?: bool|Param, // Throw an exception if an entry is missing from the manifest.json. // Default: false
|
||||||
* version_strategy?: scalar|Param|null, // Default: null
|
* version_strategy?: scalar|Param|null, // Default: null
|
||||||
@@ -276,12 +276,12 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* version_format?: scalar|Param|null, // Default: null
|
* version_format?: scalar|Param|null, // Default: null
|
||||||
* json_manifest_path?: scalar|Param|null, // Default: null
|
* json_manifest_path?: scalar|Param|null, // Default: null
|
||||||
* base_path?: scalar|Param|null, // Default: ""
|
* base_path?: scalar|Param|null, // Default: ""
|
||||||
* base_urls?: list<scalar|Param|null>,
|
* base_urls?: string|list<scalar|Param|null>,
|
||||||
* }>,
|
* }>,
|
||||||
* },
|
* },
|
||||||
* asset_mapper?: bool|array{ // Asset Mapper configuration
|
* asset_mapper?: bool|array{ // Asset Mapper configuration
|
||||||
* enabled?: bool|Param, // Default: true
|
* enabled?: bool|Param, // Default: true
|
||||||
* paths?: array<string, scalar|Param|null>,
|
* paths?: string|array<string, scalar|Param|null>,
|
||||||
* excluded_patterns?: list<scalar|Param|null>,
|
* excluded_patterns?: list<scalar|Param|null>,
|
||||||
* exclude_dotfiles?: bool|Param, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true
|
* exclude_dotfiles?: bool|Param, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true
|
||||||
* server?: bool|Param, // If true, a "dev server" will return the assets from the public directory (true in "debug" mode only by default). // Default: true
|
* server?: bool|Param, // If true, a "dev server" will return the assets from the public directory (true in "debug" mode only by default). // Default: true
|
||||||
@@ -300,7 +300,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* },
|
* },
|
||||||
* translator?: bool|array{ // Translator configuration
|
* translator?: bool|array{ // Translator configuration
|
||||||
* enabled?: bool|Param, // Default: true
|
* enabled?: bool|Param, // Default: true
|
||||||
* fallbacks?: list<scalar|Param|null>,
|
* fallbacks?: string|list<scalar|Param|null>,
|
||||||
* logging?: bool|Param, // Default: false
|
* logging?: bool|Param, // Default: false
|
||||||
* formatter?: scalar|Param|null, // Default: "translator.formatter.default"
|
* formatter?: scalar|Param|null, // Default: "translator.formatter.default"
|
||||||
* cache_dir?: scalar|Param|null, // Default: "%kernel.cache_dir%/translations"
|
* cache_dir?: scalar|Param|null, // Default: "%kernel.cache_dir%/translations"
|
||||||
@@ -329,7 +329,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* validation?: bool|array{ // Validation configuration
|
* validation?: bool|array{ // Validation configuration
|
||||||
* enabled?: bool|Param, // Default: true
|
* enabled?: bool|Param, // Default: true
|
||||||
* enable_attributes?: bool|Param, // Default: true
|
* enable_attributes?: bool|Param, // Default: true
|
||||||
* static_method?: list<scalar|Param|null>,
|
* static_method?: string|list<scalar|Param|null>,
|
||||||
* translation_domain?: scalar|Param|null, // Default: "validators"
|
* translation_domain?: scalar|Param|null, // Default: "validators"
|
||||||
* email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict"|Param, // Default: "html5"
|
* email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict"|Param, // Default: "html5"
|
||||||
* mapping?: array{
|
* mapping?: array{
|
||||||
@@ -389,7 +389,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* default_doctrine_dbal_provider?: scalar|Param|null, // Default: "database_connection"
|
* default_doctrine_dbal_provider?: scalar|Param|null, // Default: "database_connection"
|
||||||
* default_pdo_provider?: scalar|Param|null, // Default: null
|
* default_pdo_provider?: scalar|Param|null, // Default: null
|
||||||
* pools?: array<string, array{ // Default: []
|
* pools?: array<string, array{ // Default: []
|
||||||
* adapters?: list<scalar|Param|null>,
|
* adapters?: string|list<scalar|Param|null>,
|
||||||
* tags?: scalar|Param|null, // Default: null
|
* tags?: scalar|Param|null, // Default: null
|
||||||
* public?: bool|Param, // Default: false
|
* public?: bool|Param, // Default: false
|
||||||
* default_lifetime?: scalar|Param|null, // Default lifetime of the pool.
|
* default_lifetime?: scalar|Param|null, // Default lifetime of the pool.
|
||||||
@@ -412,11 +412,11 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* },
|
* },
|
||||||
* lock?: bool|string|array{ // Lock configuration
|
* lock?: bool|string|array{ // Lock configuration
|
||||||
* enabled?: bool|Param, // Default: false
|
* enabled?: bool|Param, // Default: false
|
||||||
* resources?: array<string, string|list<scalar|Param|null>>,
|
* resources?: string|array<string, string|list<scalar|Param|null>>,
|
||||||
* },
|
* },
|
||||||
* semaphore?: bool|string|array{ // Semaphore configuration
|
* semaphore?: bool|string|array{ // Semaphore configuration
|
||||||
* enabled?: bool|Param, // Default: false
|
* enabled?: bool|Param, // Default: false
|
||||||
* resources?: array<string, scalar|Param|null>,
|
* resources?: string|array<string, scalar|Param|null>,
|
||||||
* },
|
* },
|
||||||
* messenger?: bool|array{ // Messenger configuration
|
* messenger?: bool|array{ // Messenger configuration
|
||||||
* enabled?: bool|Param, // Default: false
|
* enabled?: bool|Param, // Default: false
|
||||||
@@ -446,7 +446,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* rate_limiter?: scalar|Param|null, // Rate limiter name to use when processing messages. // Default: null
|
* rate_limiter?: scalar|Param|null, // Rate limiter name to use when processing messages. // Default: null
|
||||||
* }>,
|
* }>,
|
||||||
* failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null
|
* failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null
|
||||||
* stop_worker_on_signals?: list<scalar|Param|null>,
|
* stop_worker_on_signals?: int|string|list<scalar|Param|null>,
|
||||||
* default_bus?: scalar|Param|null, // Default: null
|
* default_bus?: scalar|Param|null, // Default: null
|
||||||
* buses?: array<string, array{ // Default: {"messenger.bus.default":{"default_middleware":{"enabled":true,"allow_no_handlers":false,"allow_no_senders":true},"middleware":[]}}
|
* buses?: array<string, array{ // Default: {"messenger.bus.default":{"default_middleware":{"enabled":true,"allow_no_handlers":false,"allow_no_senders":true},"middleware":[]}}
|
||||||
* default_middleware?: bool|string|array{
|
* default_middleware?: bool|string|array{
|
||||||
@@ -454,7 +454,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* allow_no_handlers?: bool|Param, // Default: false
|
* allow_no_handlers?: bool|Param, // Default: false
|
||||||
* allow_no_senders?: bool|Param, // Default: true
|
* allow_no_senders?: bool|Param, // Default: true
|
||||||
* },
|
* },
|
||||||
* middleware?: list<string|array{ // Default: []
|
* middleware?: string|list<string|array{ // Default: []
|
||||||
* id?: scalar|Param|null,
|
* id?: scalar|Param|null,
|
||||||
* arguments?: list<mixed>,
|
* arguments?: list<mixed>,
|
||||||
* }>,
|
* }>,
|
||||||
@@ -503,9 +503,9 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* retry_failed?: bool|array{
|
* retry_failed?: bool|array{
|
||||||
* enabled?: bool|Param, // Default: false
|
* enabled?: bool|Param, // Default: false
|
||||||
* retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null
|
* retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null
|
||||||
* http_codes?: array<string, array{ // Default: []
|
* http_codes?: int|string|array<string, array{ // Default: []
|
||||||
* code?: int|Param,
|
* code?: int|Param,
|
||||||
* methods?: list<string|Param>,
|
* methods?: string|list<string|Param>,
|
||||||
* }>,
|
* }>,
|
||||||
* max_retries?: int|Param, // Default: 3
|
* max_retries?: int|Param, // Default: 3
|
||||||
* delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000
|
* delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000
|
||||||
@@ -556,9 +556,9 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* retry_failed?: bool|array{
|
* retry_failed?: bool|array{
|
||||||
* enabled?: bool|Param, // Default: false
|
* enabled?: bool|Param, // Default: false
|
||||||
* retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null
|
* retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null
|
||||||
* http_codes?: array<string, array{ // Default: []
|
* http_codes?: int|string|array<string, array{ // Default: []
|
||||||
* code?: int|Param,
|
* code?: int|Param,
|
||||||
* methods?: list<string|Param>,
|
* methods?: string|list<string|Param>,
|
||||||
* }>,
|
* }>,
|
||||||
* max_retries?: int|Param, // Default: 3
|
* max_retries?: int|Param, // Default: 3
|
||||||
* delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000
|
* delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000
|
||||||
@@ -575,8 +575,8 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* transports?: array<string, scalar|Param|null>,
|
* transports?: array<string, scalar|Param|null>,
|
||||||
* envelope?: array{ // Mailer Envelope configuration
|
* envelope?: array{ // Mailer Envelope configuration
|
||||||
* sender?: scalar|Param|null,
|
* sender?: scalar|Param|null,
|
||||||
* recipients?: list<scalar|Param|null>,
|
* recipients?: string|list<scalar|Param|null>,
|
||||||
* allowed_recipients?: list<scalar|Param|null>,
|
* allowed_recipients?: string|list<scalar|Param|null>,
|
||||||
* },
|
* },
|
||||||
* headers?: array<string, string|array{ // Default: []
|
* headers?: array<string, string|array{ // Default: []
|
||||||
* value?: mixed,
|
* value?: mixed,
|
||||||
@@ -628,7 +628,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* cache_pool?: scalar|Param|null, // The cache pool to use for storing the current limiter state. // Default: "cache.rate_limiter"
|
* cache_pool?: scalar|Param|null, // The cache pool to use for storing the current limiter state. // Default: "cache.rate_limiter"
|
||||||
* storage_service?: scalar|Param|null, // The service ID of a custom storage implementation, this precedes any configured "cache_pool". // Default: null
|
* storage_service?: scalar|Param|null, // The service ID of a custom storage implementation, this precedes any configured "cache_pool". // Default: null
|
||||||
* policy?: "fixed_window"|"token_bucket"|"sliding_window"|"compound"|"no_limit"|Param, // The algorithm to be used by this limiter.
|
* policy?: "fixed_window"|"token_bucket"|"sliding_window"|"compound"|"no_limit"|Param, // The algorithm to be used by this limiter.
|
||||||
* limiters?: list<scalar|Param|null>,
|
* limiters?: string|list<scalar|Param|null>,
|
||||||
* limit?: int|Param, // The maximum allowed hits in a fixed interval or burst.
|
* limit?: int|Param, // The maximum allowed hits in a fixed interval or burst.
|
||||||
* interval?: scalar|Param|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).
|
* interval?: scalar|Param|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).
|
||||||
* rate?: array{ // Configures the fill rate if "policy" is set to "token_bucket".
|
* rate?: array{ // Configures the fill rate if "policy" is set to "token_bucket".
|
||||||
@@ -651,20 +651,20 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* allow_safe_elements?: bool|Param, // Allows "safe" elements and attributes. // Default: false
|
* allow_safe_elements?: bool|Param, // Allows "safe" elements and attributes. // Default: false
|
||||||
* allow_static_elements?: bool|Param, // Allows all static elements and attributes from the W3C Sanitizer API standard. // Default: false
|
* allow_static_elements?: bool|Param, // Allows all static elements and attributes from the W3C Sanitizer API standard. // Default: false
|
||||||
* allow_elements?: array<string, mixed>,
|
* allow_elements?: array<string, mixed>,
|
||||||
* block_elements?: list<string|Param>,
|
* block_elements?: string|list<string|Param>,
|
||||||
* drop_elements?: list<string|Param>,
|
* drop_elements?: string|list<string|Param>,
|
||||||
* allow_attributes?: array<string, mixed>,
|
* allow_attributes?: array<string, mixed>,
|
||||||
* drop_attributes?: array<string, mixed>,
|
* drop_attributes?: array<string, mixed>,
|
||||||
* force_attributes?: array<string, array<string, string|Param>>,
|
* force_attributes?: array<string, array<string, string|Param>>,
|
||||||
* force_https_urls?: bool|Param, // Transforms URLs using the HTTP scheme to use the HTTPS scheme instead. // Default: false
|
* force_https_urls?: bool|Param, // Transforms URLs using the HTTP scheme to use the HTTPS scheme instead. // Default: false
|
||||||
* allowed_link_schemes?: list<string|Param>,
|
* allowed_link_schemes?: string|list<string|Param>,
|
||||||
* allowed_link_hosts?: list<string|Param>|null,
|
* allowed_link_hosts?: null|string|list<string|Param>,
|
||||||
* allow_relative_links?: bool|Param, // Allows relative URLs to be used in links href attributes. // Default: false
|
* allow_relative_links?: bool|Param, // Allows relative URLs to be used in links href attributes. // Default: false
|
||||||
* allowed_media_schemes?: list<string|Param>,
|
* allowed_media_schemes?: string|list<string|Param>,
|
||||||
* allowed_media_hosts?: list<string|Param>|null,
|
* allowed_media_hosts?: null|string|list<string|Param>,
|
||||||
* allow_relative_medias?: bool|Param, // Allows relative URLs to be used in media source attributes (img, audio, video, ...). // Default: false
|
* allow_relative_medias?: bool|Param, // Allows relative URLs to be used in media source attributes (img, audio, video, ...). // Default: false
|
||||||
* with_attribute_sanitizers?: list<string|Param>,
|
* with_attribute_sanitizers?: string|list<string|Param>,
|
||||||
* without_attribute_sanitizers?: list<string|Param>,
|
* without_attribute_sanitizers?: string|list<string|Param>,
|
||||||
* max_input_length?: int|Param, // The maximum length allowed for the sanitized input. // Default: 0
|
* max_input_length?: int|Param, // The maximum length allowed for the sanitized input. // Default: 0
|
||||||
* }>,
|
* }>,
|
||||||
* },
|
* },
|
||||||
@@ -912,7 +912,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* auto_reload?: scalar|Param|null,
|
* auto_reload?: scalar|Param|null,
|
||||||
* optimizations?: int|Param,
|
* optimizations?: int|Param,
|
||||||
* default_path?: scalar|Param|null, // The default path used to load templates. // Default: "%kernel.project_dir%/templates"
|
* default_path?: scalar|Param|null, // The default path used to load templates. // Default: "%kernel.project_dir%/templates"
|
||||||
* file_name_pattern?: list<scalar|Param|null>,
|
* file_name_pattern?: string|list<scalar|Param|null>,
|
||||||
* paths?: array<string, mixed>,
|
* paths?: array<string, mixed>,
|
||||||
* date?: array{ // The default format options used by the date filter.
|
* date?: array{ // The default format options used by the date filter.
|
||||||
* format?: scalar|Param|null, // Default: "F j, Y H:i"
|
* format?: scalar|Param|null, // Default: "F j, Y H:i"
|
||||||
@@ -942,7 +942,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* },
|
* },
|
||||||
* password_hashers?: array<string, string|array{ // Default: []
|
* password_hashers?: array<string, string|array{ // Default: []
|
||||||
* algorithm?: scalar|Param|null,
|
* algorithm?: scalar|Param|null,
|
||||||
* migrate_from?: list<scalar|Param|null>,
|
* migrate_from?: string|list<scalar|Param|null>,
|
||||||
* hash_algorithm?: scalar|Param|null, // Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms. // Default: "sha512"
|
* hash_algorithm?: scalar|Param|null, // Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms. // Default: "sha512"
|
||||||
* key_length?: scalar|Param|null, // Default: 40
|
* key_length?: scalar|Param|null, // Default: 40
|
||||||
* ignore_case?: bool|Param, // Default: false
|
* ignore_case?: bool|Param, // Default: false
|
||||||
@@ -956,7 +956,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* providers?: array<string, array{ // Default: []
|
* providers?: array<string, array{ // Default: []
|
||||||
* id?: scalar|Param|null,
|
* id?: scalar|Param|null,
|
||||||
* chain?: array{
|
* chain?: array{
|
||||||
* providers?: list<scalar|Param|null>,
|
* providers?: string|list<scalar|Param|null>,
|
||||||
* },
|
* },
|
||||||
* entity?: array{
|
* entity?: array{
|
||||||
* class?: scalar|Param|null, // The full entity class name of your user class.
|
* class?: scalar|Param|null, // The full entity class name of your user class.
|
||||||
@@ -966,7 +966,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* memory?: array{
|
* memory?: array{
|
||||||
* users?: array<string, array{ // Default: []
|
* users?: array<string, array{ // Default: []
|
||||||
* password?: scalar|Param|null, // Default: null
|
* password?: scalar|Param|null, // Default: null
|
||||||
* roles?: list<scalar|Param|null>,
|
* roles?: string|list<scalar|Param|null>,
|
||||||
* }>,
|
* }>,
|
||||||
* },
|
* },
|
||||||
* ldap?: array{
|
* ldap?: array{
|
||||||
@@ -975,7 +975,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* search_dn?: scalar|Param|null, // Default: null
|
* search_dn?: scalar|Param|null, // Default: null
|
||||||
* search_password?: scalar|Param|null, // Default: null
|
* search_password?: scalar|Param|null, // Default: null
|
||||||
* extra_fields?: list<scalar|Param|null>,
|
* extra_fields?: list<scalar|Param|null>,
|
||||||
* default_roles?: list<scalar|Param|null>,
|
* default_roles?: string|list<scalar|Param|null>,
|
||||||
* role_fetcher?: scalar|Param|null, // Default: null
|
* role_fetcher?: scalar|Param|null, // Default: null
|
||||||
* uid_key?: scalar|Param|null, // Default: "sAMAccountName"
|
* uid_key?: scalar|Param|null, // Default: "sAMAccountName"
|
||||||
* filter?: scalar|Param|null, // Default: "({uid_key}={user_identifier})"
|
* filter?: scalar|Param|null, // Default: "({uid_key}={user_identifier})"
|
||||||
@@ -985,7 +985,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* firewalls?: array<string, array{ // Default: []
|
* firewalls?: array<string, array{ // Default: []
|
||||||
* pattern?: scalar|Param|null,
|
* pattern?: scalar|Param|null,
|
||||||
* host?: scalar|Param|null,
|
* host?: scalar|Param|null,
|
||||||
* methods?: list<scalar|Param|null>,
|
* methods?: string|list<scalar|Param|null>,
|
||||||
* security?: bool|Param, // Default: true
|
* security?: bool|Param, // Default: true
|
||||||
* user_checker?: scalar|Param|null, // The UserChecker to use when authenticating users in this firewall. // Default: "security.user_checker"
|
* user_checker?: scalar|Param|null, // The UserChecker to use when authenticating users in this firewall. // Default: "security.user_checker"
|
||||||
* request_matcher?: scalar|Param|null,
|
* request_matcher?: scalar|Param|null,
|
||||||
@@ -1004,8 +1004,8 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* path?: scalar|Param|null, // Default: "/logout"
|
* path?: scalar|Param|null, // Default: "/logout"
|
||||||
* target?: scalar|Param|null, // Default: "/"
|
* target?: scalar|Param|null, // Default: "/"
|
||||||
* invalidate_session?: bool|Param, // Default: true
|
* invalidate_session?: bool|Param, // Default: true
|
||||||
* clear_site_data?: list<"*"|"cache"|"cookies"|"storage"|"executionContexts"|Param>,
|
* clear_site_data?: string|list<"*"|"cache"|"cookies"|"storage"|"executionContexts"|Param>,
|
||||||
* delete_cookies?: array<string, array{ // Default: []
|
* delete_cookies?: string|array<string, array{ // Default: []
|
||||||
* path?: scalar|Param|null, // Default: null
|
* path?: scalar|Param|null, // Default: null
|
||||||
* domain?: scalar|Param|null, // Default: null
|
* domain?: scalar|Param|null, // Default: null
|
||||||
* secure?: scalar|Param|null, // Default: false
|
* secure?: scalar|Param|null, // Default: false
|
||||||
@@ -1143,7 +1143,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* success_handler?: scalar|Param|null,
|
* success_handler?: scalar|Param|null,
|
||||||
* failure_handler?: scalar|Param|null,
|
* failure_handler?: scalar|Param|null,
|
||||||
* realm?: scalar|Param|null, // Default: null
|
* realm?: scalar|Param|null, // Default: null
|
||||||
* token_extractors?: list<scalar|Param|null>,
|
* token_extractors?: string|list<scalar|Param|null>,
|
||||||
* token_handler?: string|array{
|
* token_handler?: string|array{
|
||||||
* id?: scalar|Param|null,
|
* id?: scalar|Param|null,
|
||||||
* oidc_user_info?: string|array{
|
* oidc_user_info?: string|array{
|
||||||
@@ -1158,7 +1158,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* },
|
* },
|
||||||
* oidc?: array{
|
* oidc?: array{
|
||||||
* discovery?: array{ // Enable the OIDC discovery.
|
* discovery?: array{ // Enable the OIDC discovery.
|
||||||
* base_uri?: list<scalar|Param|null>,
|
* base_uri?: string|list<scalar|Param|null>,
|
||||||
* cache?: array{
|
* cache?: array{
|
||||||
* id?: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
|
* id?: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
|
||||||
* },
|
* },
|
||||||
@@ -1199,7 +1199,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* remember_me?: array{
|
* remember_me?: array{
|
||||||
* secret?: scalar|Param|null, // Default: "%kernel.secret%"
|
* secret?: scalar|Param|null, // Default: "%kernel.secret%"
|
||||||
* service?: scalar|Param|null,
|
* service?: scalar|Param|null,
|
||||||
* user_providers?: list<scalar|Param|null>,
|
* user_providers?: string|list<scalar|Param|null>,
|
||||||
* catch_exceptions?: bool|Param, // Default: true
|
* catch_exceptions?: bool|Param, // Default: true
|
||||||
* signature_properties?: list<scalar|Param|null>,
|
* signature_properties?: list<scalar|Param|null>,
|
||||||
* token_provider?: string|array{
|
* token_provider?: string|array{
|
||||||
@@ -1227,12 +1227,12 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* path?: scalar|Param|null, // Use the urldecoded format. // Default: null
|
* path?: scalar|Param|null, // Use the urldecoded format. // Default: null
|
||||||
* host?: scalar|Param|null, // Default: null
|
* host?: scalar|Param|null, // Default: null
|
||||||
* port?: int|Param, // Default: null
|
* port?: int|Param, // Default: null
|
||||||
* ips?: list<scalar|Param|null>,
|
* ips?: string|list<scalar|Param|null>,
|
||||||
* attributes?: array<string, scalar|Param|null>,
|
* attributes?: array<string, scalar|Param|null>,
|
||||||
* route?: scalar|Param|null, // Default: null
|
* route?: scalar|Param|null, // Default: null
|
||||||
* methods?: list<scalar|Param|null>,
|
* methods?: string|list<scalar|Param|null>,
|
||||||
* allow_if?: scalar|Param|null, // Default: null
|
* allow_if?: scalar|Param|null, // Default: null
|
||||||
* roles?: list<scalar|Param|null>,
|
* roles?: string|list<scalar|Param|null>,
|
||||||
* }>,
|
* }>,
|
||||||
* role_hierarchy?: array<string, string|list<scalar|Param|null>>,
|
* role_hierarchy?: array<string, string|list<scalar|Param|null>>,
|
||||||
* }
|
* }
|
||||||
@@ -1288,7 +1288,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* use_underscore?: bool|Param, // Default: true
|
* use_underscore?: bool|Param, // Default: true
|
||||||
* unordered_list_markers?: list<scalar|Param|null>,
|
* unordered_list_markers?: list<scalar|Param|null>,
|
||||||
* },
|
* },
|
||||||
* ...<mixed>
|
* ...<string, mixed>
|
||||||
* },
|
* },
|
||||||
* }
|
* }
|
||||||
* @psalm-type SymfonycastsVerifyEmailConfig = array{
|
* @psalm-type SymfonycastsVerifyEmailConfig = array{
|
||||||
|
|||||||
@@ -20,6 +20,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
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ use Doctrine\ORM\EntityManagerInterface;
|
|||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\Attribute\AsController;
|
use Symfony\Component\HttpKernel\Attribute\AsController;
|
||||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
use Symfony\Component\Routing\Attribute\Route;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
use Tvdt\Entity\Answer;
|
use Tvdt\Entity\Answer;
|
||||||
@@ -110,14 +109,16 @@ final class QuizController extends AbstractController
|
|||||||
$answer = $this->answerRepository->findOneBy(['id' => $request->request->get('answer')]);
|
$answer = $this->answerRepository->findOneBy(['id' => $request->request->get('answer')]);
|
||||||
|
|
||||||
if (!$answer instanceof Answer) {
|
if (!$answer instanceof Answer) {
|
||||||
throw new BadRequestHttpException('Invalid Answer ID');
|
$this->addFlash(FlashType::Danger, $this->translator->trans('Please select an answer'));
|
||||||
|
|
||||||
|
return $this->redirectToRoute('tvdt_quiz_quiz_page', ['seasonCode' => $season->seasonCode, 'nameHash' => $nameHash]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$givenAnswer = new GivenAnswer($candidate, $answer->question->quiz, $answer);
|
$givenAnswer = new GivenAnswer($candidate, $answer->question->quiz, $answer);
|
||||||
$this->entityManager->persist($givenAnswer);
|
$this->entityManager->persist($givenAnswer);
|
||||||
$this->entityManager->flush();
|
$this->entityManager->flush();
|
||||||
|
|
||||||
// end of extarcting saving answer logic
|
// end of extracting saving answer logic
|
||||||
return $this->redirectToRoute('tvdt_quiz_quiz_page', ['seasonCode' => $season->seasonCode, 'nameHash' => $nameHash]);
|
return $this->redirectToRoute('tvdt_quiz_quiz_page', ['seasonCode' => $season->seasonCode, 'nameHash' => $nameHash]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class EliminationEnterNameType extends AbstractType
|
|||||||
'required' => true,
|
'required' => true,
|
||||||
'label' => $this->translator->trans('Enter name'),
|
'label' => $this->translator->trans('Enter name'),
|
||||||
'translation_domain' => false,
|
'translation_domain' => false,
|
||||||
'attr' => ['autofocus' => true],
|
'attr' => ['autofocus' => true, 'autocomplete' => 'off'],
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class EnterNameType extends AbstractType
|
|||||||
'required' => true,
|
'required' => true,
|
||||||
'label' => $this->translator->trans('Enter your name'),
|
'label' => $this->translator->trans('Enter your name'),
|
||||||
'translation_domain' => false,
|
'translation_domain' => false,
|
||||||
'attr' => ['autofocus' => true],
|
'attr' => ['autofocus' => true, 'autocomplete' => 'off'],
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ class QuizSpreadsheetService
|
|||||||
$arrCounter = 1;
|
$arrCounter = 1;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
try {
|
||||||
if (null === $questionArr[$arrCounter]) {
|
if (null === $questionArr[$arrCounter]) {
|
||||||
if (1 === $answerCounter) {
|
if (1 === $answerCounter) {
|
||||||
$errors[] = \sprintf('Question %d has no answers', $answerCounter);
|
$errors[] = \sprintf('Question %d has no answers', $answerCounter);
|
||||||
@@ -102,6 +103,9 @@ class QuizSpreadsheetService
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} catch (\ErrorException) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$answer = new Answer((string) $questionArr[$arrCounter++], (bool) $questionArr[$arrCounter++]);
|
$answer = new Answer((string) $questionArr[$arrCounter++], (bool) $questionArr[$arrCounter++]);
|
||||||
$answer->ordering = $answerCounter++;
|
$answer->ordering = $answerCounter++;
|
||||||
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,11 +3,6 @@
|
|||||||
{% block title %}Log in{% endblock %}
|
{% block title %}Log in{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{% if app.user %}
|
|
||||||
<div class="mb-3">
|
|
||||||
You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('tvdt_login_logout') }}">Logout</a>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<h1 class="py-2 h3 mb-3 font-weight-normal">{{ 'Please sign in'|trans }}</h1>
|
<h1 class="py-2 h3 mb-3 font-weight-normal">{{ 'Please sign in'|trans }}</h1>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@@ -27,7 +22,7 @@
|
|||||||
value="{{ csrf_token('authenticate') }}">
|
value="{{ csrf_token('authenticate') }}">
|
||||||
|
|
||||||
<div class="mb-3 form-check">
|
<div class="mb-3 form-check">
|
||||||
<input type="checkbox" name="_remember_me" id="_remember_me" class="form-check-input">
|
<input type="checkbox" name="_remember_me" id="_remember_me" class="form-check-input" checked>
|
||||||
<label for="_remember_me" class="form-check-label">{{ 'Remember me'|trans }}</label>
|
<label for="_remember_me" class="form-check-label">{{ 'Remember me'|trans }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -37,5 +32,4 @@
|
|||||||
<a href="{{ path('tvdt_register') }}"
|
<a href="{{ path('tvdt_register') }}"
|
||||||
class="btn btn-link">{{ 'Create an account'|trans }}</a>
|
class="btn btn-link">{{ 'Create an account'|trans }}</a>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{% for answer in question.answers %}
|
{% for answer in question.answers %}
|
||||||
<div class="py-1">
|
<div class="py-1">
|
||||||
<input type="radio" class="btn-check" name="answer" id="answer-{{ loop.index0 }}" autocomplete="off"
|
<input required="required" type="radio" class="btn-check" name="answer"
|
||||||
|
id="answer-{{ loop.index0 }}" autocomplete="off"
|
||||||
value="{{ answer.id }}">
|
value="{{ answer.id }}">
|
||||||
<label class="btn btn-outline-secondary" for="answer-{{ loop.index0 }}">{{ answer.text }}</label>
|
<label class="btn btn-outline-secondary" for="answer-{{ loop.index0 }}">{{ answer.text }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<source>Answer Mapping</source>
|
<source>Answer Mapping</source>
|
||||||
<target>Antwoord-kandidaat koppeling</target>
|
<target>Antwoord-kandidaat koppeling</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="Qu1euq_" resname="Are you sure you want to clear all the results? This will also delete al the eliminations.">
|
<trans-unit id="2wGfW1D" resname="Are you sure you want to clear all the results? This will also delete all the eliminations.">
|
||||||
<source>Are you sure you want to clear all the results? This will also delete all the eliminations.</source>
|
<source>Are you sure you want to clear all the results? This will also delete all the eliminations.</source>
|
||||||
<target>Weet je zeker dat je de resultaten wilt leegmaken? Dit gooit ook alle eliminaties weg.</target>
|
<target>Weet je zeker dat je de resultaten wilt leegmaken? Dit gooit ook alle eliminaties weg.</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
@@ -273,6 +273,10 @@
|
|||||||
<source>Please Confirm your Email</source>
|
<source>Please Confirm your Email</source>
|
||||||
<target>Bevestig je e-mailadres alsjeblieft</target>
|
<target>Bevestig je e-mailadres alsjeblieft</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="mq1QYAv" resname="Please select an answer">
|
||||||
|
<source>Please select an answer</source>
|
||||||
|
<target>Selecteer een antwoorden alsjeblieft</target>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="lSX_PHJ" resname="Please sign in">
|
<trans-unit id="lSX_PHJ" resname="Please sign in">
|
||||||
<source>Please sign in</source>
|
<source>Please sign in</source>
|
||||||
<target>Log in aub</target>
|
<target>Log in aub</target>
|
||||||
|
|||||||
Reference in New Issue
Block a user