mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-05 15:10:16 +02:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 03425024fe | |||
| 182353e2eb | |||
| 9badb1d875 | |||
| df37faa5a3 | |||
| 7ec052b0a1 | |||
| f90fb00547 | |||
| aa39db3f5e | |||
| 55bbe962c1 | |||
| d3bb8d7c57 | |||
| b799dfd5e5 | |||
| 86e7d07078 | |||
| c68e865a78 |
+16
-1
@@ -7,9 +7,24 @@ version: 2
|
||||
updates:
|
||||
- package-ecosystem: "composer" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
allow:
|
||||
# Allow both direct and indirect updates for all packages
|
||||
- dependency-type: "all"
|
||||
schedule:
|
||||
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"
|
||||
directtory: "/"
|
||||
directory: "/"
|
||||
schedule:
|
||||
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
|
||||
._*
|
||||
|
||||
# IDEs
|
||||
/.idea/
|
||||
/.vscode/
|
||||
|
||||
# Junie
|
||||
!/.junie/
|
||||
/.junie/memory/
|
||||
/.junie/plans/
|
||||
|
||||
# Windows
|
||||
Thumbs.db
|
||||
Desktop.ini
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
|
||||
Generated
+1
@@ -165,6 +165,7 @@
|
||||
<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/stof/doctrine-extensions-bundle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/git-state" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
|
||||
Generated
+3
@@ -200,6 +200,9 @@
|
||||
<path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
|
||||
<path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
|
||||
<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>
|
||||
</component>
|
||||
<component name="PhpInterpreters">
|
||||
|
||||
Generated
-6
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="PROJECT" dialect="PostgreSQL" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -61,6 +61,19 @@ The project uses `just` as the primary task runner. Always prefer `just` command
|
||||
- CSS/Sass is in `assets/styles/`.
|
||||
- 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
|
||||
- `composer.json`: Dependency management.
|
||||
- `importmap.php`: JavaScript module mapping.
|
||||
+1
-1
@@ -37,7 +37,7 @@
|
||||
"symfony/translation": "8.0.*",
|
||||
"symfony/twig-bundle": "8.0.*",
|
||||
"symfony/uid": "8.0.*",
|
||||
"symfony/ux-turbo": "^2.33.0",
|
||||
"symfony/ux-turbo": "^2.35.0",
|
||||
"symfony/validator": "8.0.*",
|
||||
"symfony/yaml": "8.0.*",
|
||||
"symfonycasts/sass-bundle": "^0.9",
|
||||
|
||||
Generated
+609
-508
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,10 @@ security:
|
||||
default_target_path: tvdt_backoffice_index
|
||||
logout:
|
||||
path: tvdt_login_logout
|
||||
|
||||
remember_me:
|
||||
secret: '%kernel.secret%'
|
||||
lifetime: 604800 # 1 week in seconds
|
||||
|
||||
access_control:
|
||||
- { path: ^/admin, roles: ROLE_ADMIN }
|
||||
- { path: ^/backoffice, roles: ROLE_USER }
|
||||
|
||||
Generated
+49
-49
@@ -128,7 +128,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* @psalm-type FrameworkConfig = array{
|
||||
* 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
|
||||
* 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)%"
|
||||
* ide?: scalar|Param|null, // Default: "%env(default::SYMFONY_IDE)%"
|
||||
* 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_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>,
|
||||
* trusted_hosts?: list<scalar|Param|null>,
|
||||
* trusted_hosts?: string|list<scalar|Param|null>,
|
||||
* 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"
|
||||
* handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true
|
||||
* csrf_protection?: bool|array{
|
||||
@@ -202,23 +202,23 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* property?: scalar|Param|null,
|
||||
* service?: scalar|Param|null,
|
||||
* },
|
||||
* supports?: list<scalar|Param|null>,
|
||||
* supports?: string|list<scalar|Param|null>,
|
||||
* definition_validators?: list<scalar|Param|null>,
|
||||
* support_strategy?: scalar|Param|null,
|
||||
* initial_marking?: list<scalar|Param|null>,
|
||||
* events_to_dispatch?: list<string|Param>|null,
|
||||
* places?: list<array{ // Default: []
|
||||
* initial_marking?: \BackedEnum|string|list<scalar|Param|null>,
|
||||
* events_to_dispatch?: null|list<string|Param>,
|
||||
* places?: string|list<array{ // Default: []
|
||||
* name?: scalar|Param|null,
|
||||
* metadata?: array<string, mixed>,
|
||||
* }>,
|
||||
* transitions?: list<array{ // Default: []
|
||||
* name?: string|Param,
|
||||
* guard?: string|Param, // An expression to block the transition.
|
||||
* from?: list<array{ // Default: []
|
||||
* from?: \BackedEnum|string|list<array{ // Default: []
|
||||
* place?: string|Param,
|
||||
* weight?: int|Param, // Default: 1
|
||||
* }>,
|
||||
* to?: list<array{ // Default: []
|
||||
* to?: \BackedEnum|string|list<array{ // Default: []
|
||||
* place?: string|Param,
|
||||
* 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"
|
||||
* json_manifest_path?: scalar|Param|null, // Default: null
|
||||
* base_path?: scalar|Param|null, // Default: ""
|
||||
* base_urls?: list<scalar|Param|null>,
|
||||
* base_urls?: string|list<scalar|Param|null>,
|
||||
* packages?: array<string, array{ // Default: []
|
||||
* 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
|
||||
@@ -276,12 +276,12 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* version_format?: scalar|Param|null, // Default: null
|
||||
* json_manifest_path?: scalar|Param|null, // Default: null
|
||||
* 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
|
||||
* enabled?: bool|Param, // Default: true
|
||||
* paths?: array<string, scalar|Param|null>,
|
||||
* paths?: string|array<string, 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
|
||||
* 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
|
||||
* enabled?: bool|Param, // Default: true
|
||||
* fallbacks?: list<scalar|Param|null>,
|
||||
* fallbacks?: string|list<scalar|Param|null>,
|
||||
* logging?: bool|Param, // Default: false
|
||||
* formatter?: scalar|Param|null, // Default: "translator.formatter.default"
|
||||
* 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
|
||||
* enabled?: 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"
|
||||
* email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict"|Param, // Default: "html5"
|
||||
* 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_pdo_provider?: scalar|Param|null, // Default: null
|
||||
* pools?: array<string, array{ // Default: []
|
||||
* adapters?: list<scalar|Param|null>,
|
||||
* adapters?: string|list<scalar|Param|null>,
|
||||
* tags?: scalar|Param|null, // Default: null
|
||||
* public?: bool|Param, // Default: false
|
||||
* 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
|
||||
* 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
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* resources?: array<string, scalar|Param|null>,
|
||||
* resources?: string|array<string, scalar|Param|null>,
|
||||
* },
|
||||
* messenger?: bool|array{ // Messenger configuration
|
||||
* 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
|
||||
* }>,
|
||||
* 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
|
||||
* 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{
|
||||
@@ -454,7 +454,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* allow_no_handlers?: bool|Param, // Default: false
|
||||
* allow_no_senders?: bool|Param, // Default: true
|
||||
* },
|
||||
* middleware?: list<string|array{ // Default: []
|
||||
* middleware?: string|list<string|array{ // Default: []
|
||||
* id?: scalar|Param|null,
|
||||
* arguments?: list<mixed>,
|
||||
* }>,
|
||||
@@ -503,9 +503,9 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* retry_failed?: bool|array{
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* 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,
|
||||
* methods?: list<string|Param>,
|
||||
* methods?: string|list<string|Param>,
|
||||
* }>,
|
||||
* max_retries?: int|Param, // Default: 3
|
||||
* 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{
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* 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,
|
||||
* methods?: list<string|Param>,
|
||||
* methods?: string|list<string|Param>,
|
||||
* }>,
|
||||
* max_retries?: int|Param, // Default: 3
|
||||
* 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>,
|
||||
* envelope?: array{ // Mailer Envelope configuration
|
||||
* sender?: scalar|Param|null,
|
||||
* recipients?: list<scalar|Param|null>,
|
||||
* allowed_recipients?: list<scalar|Param|null>,
|
||||
* recipients?: string|list<scalar|Param|null>,
|
||||
* allowed_recipients?: string|list<scalar|Param|null>,
|
||||
* },
|
||||
* headers?: array<string, string|array{ // Default: []
|
||||
* 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"
|
||||
* 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.
|
||||
* limiters?: list<scalar|Param|null>,
|
||||
* limiters?: string|list<scalar|Param|null>,
|
||||
* 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).
|
||||
* 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_static_elements?: bool|Param, // Allows all static elements and attributes from the W3C Sanitizer API standard. // Default: false
|
||||
* allow_elements?: array<string, mixed>,
|
||||
* block_elements?: list<string|Param>,
|
||||
* drop_elements?: list<string|Param>,
|
||||
* block_elements?: string|list<string|Param>,
|
||||
* drop_elements?: string|list<string|Param>,
|
||||
* allow_attributes?: array<string, mixed>,
|
||||
* drop_attributes?: array<string, mixed>,
|
||||
* 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
|
||||
* allowed_link_schemes?: list<string|Param>,
|
||||
* allowed_link_hosts?: list<string|Param>|null,
|
||||
* allowed_link_schemes?: string|list<string|Param>,
|
||||
* 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
|
||||
* allowed_media_schemes?: list<string|Param>,
|
||||
* allowed_media_hosts?: list<string|Param>|null,
|
||||
* allowed_media_schemes?: string|list<string|Param>,
|
||||
* 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
|
||||
* with_attribute_sanitizers?: list<string|Param>,
|
||||
* without_attribute_sanitizers?: list<string|Param>,
|
||||
* with_attribute_sanitizers?: string|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
|
||||
* }>,
|
||||
* },
|
||||
@@ -912,7 +912,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* auto_reload?: scalar|Param|null,
|
||||
* optimizations?: int|Param,
|
||||
* 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>,
|
||||
* date?: array{ // The default format options used by the date filter.
|
||||
* 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: []
|
||||
* 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"
|
||||
* key_length?: scalar|Param|null, // Default: 40
|
||||
* ignore_case?: bool|Param, // Default: false
|
||||
@@ -956,7 +956,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* providers?: array<string, array{ // Default: []
|
||||
* id?: scalar|Param|null,
|
||||
* chain?: array{
|
||||
* providers?: list<scalar|Param|null>,
|
||||
* providers?: string|list<scalar|Param|null>,
|
||||
* },
|
||||
* entity?: array{
|
||||
* 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{
|
||||
* users?: array<string, array{ // Default: []
|
||||
* password?: scalar|Param|null, // Default: null
|
||||
* roles?: list<scalar|Param|null>,
|
||||
* roles?: string|list<scalar|Param|null>,
|
||||
* }>,
|
||||
* },
|
||||
* ldap?: array{
|
||||
@@ -975,7 +975,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* search_dn?: scalar|Param|null, // Default: null
|
||||
* search_password?: scalar|Param|null, // Default: 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
|
||||
* uid_key?: scalar|Param|null, // Default: "sAMAccountName"
|
||||
* 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: []
|
||||
* pattern?: scalar|Param|null,
|
||||
* host?: scalar|Param|null,
|
||||
* methods?: list<scalar|Param|null>,
|
||||
* methods?: string|list<scalar|Param|null>,
|
||||
* security?: bool|Param, // Default: true
|
||||
* user_checker?: scalar|Param|null, // The UserChecker to use when authenticating users in this firewall. // Default: "security.user_checker"
|
||||
* request_matcher?: scalar|Param|null,
|
||||
@@ -1004,8 +1004,8 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* path?: scalar|Param|null, // Default: "/logout"
|
||||
* target?: scalar|Param|null, // Default: "/"
|
||||
* invalidate_session?: bool|Param, // Default: true
|
||||
* clear_site_data?: list<"*"|"cache"|"cookies"|"storage"|"executionContexts"|Param>,
|
||||
* delete_cookies?: array<string, array{ // Default: []
|
||||
* clear_site_data?: string|list<"*"|"cache"|"cookies"|"storage"|"executionContexts"|Param>,
|
||||
* delete_cookies?: string|array<string, array{ // Default: []
|
||||
* path?: scalar|Param|null, // Default: null
|
||||
* domain?: scalar|Param|null, // Default: null
|
||||
* secure?: scalar|Param|null, // Default: false
|
||||
@@ -1143,7 +1143,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* success_handler?: scalar|Param|null,
|
||||
* failure_handler?: scalar|Param|null,
|
||||
* realm?: scalar|Param|null, // Default: null
|
||||
* token_extractors?: list<scalar|Param|null>,
|
||||
* token_extractors?: string|list<scalar|Param|null>,
|
||||
* token_handler?: string|array{
|
||||
* id?: scalar|Param|null,
|
||||
* oidc_user_info?: string|array{
|
||||
@@ -1158,7 +1158,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* },
|
||||
* oidc?: array{
|
||||
* discovery?: array{ // Enable the OIDC discovery.
|
||||
* base_uri?: list<scalar|Param|null>,
|
||||
* base_uri?: string|list<scalar|Param|null>,
|
||||
* cache?: array{
|
||||
* 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{
|
||||
* secret?: scalar|Param|null, // Default: "%kernel.secret%"
|
||||
* service?: scalar|Param|null,
|
||||
* user_providers?: list<scalar|Param|null>,
|
||||
* user_providers?: string|list<scalar|Param|null>,
|
||||
* catch_exceptions?: bool|Param, // Default: true
|
||||
* signature_properties?: list<scalar|Param|null>,
|
||||
* 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
|
||||
* host?: scalar|Param|null, // Default: null
|
||||
* port?: int|Param, // Default: null
|
||||
* ips?: list<scalar|Param|null>,
|
||||
* ips?: string|list<scalar|Param|null>,
|
||||
* attributes?: array<string, scalar|Param|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
|
||||
* roles?: list<scalar|Param|null>,
|
||||
* roles?: 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
|
||||
* unordered_list_markers?: list<scalar|Param|null>,
|
||||
* },
|
||||
* ...<mixed>
|
||||
* ...<string, mixed>
|
||||
* },
|
||||
* }
|
||||
* @psalm-type SymfonycastsVerifyEmailConfig = array{
|
||||
|
||||
@@ -20,6 +20,10 @@ final class LoginController extends AbstractController
|
||||
#[Route(path: '/login', name: 'tvdt_login_login')]
|
||||
public function login(): Response
|
||||
{
|
||||
if ($this->getUser() instanceof UserInterface) {
|
||||
return $this->redirectToRoute('tvdt_backoffice_index');
|
||||
}
|
||||
|
||||
// get the login error if there is one
|
||||
$error = $this->authenticationUtils->getLastAuthenticationError();
|
||||
// last username entered by the user
|
||||
|
||||
@@ -8,7 +8,6 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Attribute\AsController;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Tvdt\Entity\Answer;
|
||||
@@ -110,14 +109,16 @@ final class QuizController extends AbstractController
|
||||
$answer = $this->answerRepository->findOneBy(['id' => $request->request->get('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);
|
||||
$this->entityManager->persist($givenAnswer);
|
||||
$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]);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
||||
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use SymfonyCasts\Bundle\VerifyEmail\Exception\VerifyEmailExceptionInterface;
|
||||
use Tvdt\Entity\User;
|
||||
@@ -30,6 +31,10 @@ final class RegistrationController extends AbstractController
|
||||
public function register(
|
||||
Request $request,
|
||||
): Response {
|
||||
if ($this->getUser() instanceof UserInterface) {
|
||||
return $this->redirectToRoute('tvdt_backoffice_index');
|
||||
}
|
||||
|
||||
$user = new User();
|
||||
$form = $this->createForm(RegistrationFormType::class, $user);
|
||||
$form->handleRequest($request);
|
||||
|
||||
@@ -22,7 +22,7 @@ class EliminationEnterNameType extends AbstractType
|
||||
'required' => true,
|
||||
'label' => $this->translator->trans('Enter name'),
|
||||
'translation_domain' => false,
|
||||
'attr' => ['autofocus' => true],
|
||||
'attr' => ['autofocus' => true, 'autocomplete' => 'off'],
|
||||
],
|
||||
)
|
||||
;
|
||||
|
||||
@@ -22,7 +22,7 @@ class EnterNameType extends AbstractType
|
||||
'required' => true,
|
||||
'label' => $this->translator->trans('Enter your name'),
|
||||
'translation_domain' => false,
|
||||
'attr' => ['autofocus' => true],
|
||||
'attr' => ['autofocus' => true, 'autocomplete' => 'off'],
|
||||
],
|
||||
)
|
||||
;
|
||||
|
||||
@@ -30,6 +30,7 @@ class QuestionRepository extends ServiceEntityRepository
|
||||
and q1.quiz = :quiz
|
||||
)
|
||||
and qz = :quiz
|
||||
order by q.ordering
|
||||
DQL)
|
||||
->setMaxResults(1)
|
||||
->setParameter('candidate', $candidate)
|
||||
|
||||
@@ -95,11 +95,15 @@ class QuizSpreadsheetService
|
||||
$arrCounter = 1;
|
||||
|
||||
while (true) {
|
||||
if (null === $questionArr[$arrCounter]) {
|
||||
if (1 === $answerCounter) {
|
||||
$errors[] = \sprintf('Question %d has no answers', $answerCounter);
|
||||
}
|
||||
try {
|
||||
if (null === $questionArr[$arrCounter]) {
|
||||
if (1 === $answerCounter) {
|
||||
$errors[] = \sprintf('Question %d has no answers', $answerCounter);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
} catch (\ErrorException) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -130,6 +134,6 @@ class QuizSpreadsheetService
|
||||
|
||||
private function isSpreadsheetFile(File $file): bool
|
||||
{
|
||||
return 'xlsx' === $file->getExtension();
|
||||
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' === $file->getMimeType();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,39 +3,33 @@
|
||||
{% block title %}Log in{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% if app.user %}
|
||||
<form method="post">
|
||||
<h1 class="py-2 h3 mb-3 font-weight-normal">{{ 'Please sign in'|trans }}</h1>
|
||||
<div class="mb-3">
|
||||
You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('tvdt_login_logout') }}">Logout</a>
|
||||
<label for="username" class="form-label">{{ 'Email'|trans }}</label>
|
||||
<input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control"
|
||||
autocomplete="email" required autofocus>
|
||||
</div>
|
||||
{% else %}
|
||||
<form method="post">
|
||||
<h1 class="py-2 h3 mb-3 font-weight-normal">{{ 'Please sign in'|trans }}</h1>
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">{{ 'Email'|trans }}</label>
|
||||
<input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control"
|
||||
autocomplete="email" required autofocus>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">{{ 'Password'|trans }}</label>
|
||||
<input type="password" name="_password" id="password" class="form-control"
|
||||
autocomplete="current-password"
|
||||
required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">{{ 'Password'|trans }}</label>
|
||||
<input type="password" name="_password" id="password" class="form-control"
|
||||
autocomplete="current-password"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="_csrf_token" data-controller="csrf-protection"
|
||||
value="{{ csrf_token('authenticate') }}">
|
||||
<input type="hidden" name="_csrf_token" data-controller="csrf-protection"
|
||||
value="{{ csrf_token('authenticate') }}">
|
||||
|
||||
<div class="mb-3 form-check">
|
||||
<input type="checkbox" name="_remember_me" id="_remember_me" class="form-check-input">
|
||||
<label for="_remember_me" class="form-check-label">{{ 'Remember me'|trans }}</label>
|
||||
</div>
|
||||
<div class="mb-3 form-check">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-lg btn-primary" type="submit">
|
||||
{{ 'Sign in'|trans }}
|
||||
</button>
|
||||
<a href="{{ path('tvdt_register') }}"
|
||||
class="btn btn-link">{{ 'Create an account'|trans }}</a>
|
||||
</form>
|
||||
{% endif %}
|
||||
<button class="btn btn-lg btn-primary" type="submit">
|
||||
{{ 'Sign in'|trans }}
|
||||
</button>
|
||||
<a href="{{ path('tvdt_register') }}"
|
||||
class="btn btn-link">{{ 'Create an account'|trans }}</a>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
{% else %}
|
||||
{% for answer in question.answers %}
|
||||
<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 }}">
|
||||
<label class="btn btn-outline-secondary" for="answer-{{ loop.index0 }}">{{ answer.text }}</label>
|
||||
</div>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<source>Answer Mapping</source>
|
||||
<target>Antwoord-kandidaat koppeling</target>
|
||||
</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>
|
||||
<target>Weet je zeker dat je de resultaten wilt leegmaken? Dit gooit ook alle eliminaties weg.</target>
|
||||
</trans-unit>
|
||||
@@ -273,6 +273,10 @@
|
||||
<source>Please Confirm your Email</source>
|
||||
<target>Bevestig je e-mailadres alsjeblieft</target>
|
||||
</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">
|
||||
<source>Please sign in</source>
|
||||
<target>Log in aub</target>
|
||||
|
||||
Reference in New Issue
Block a user