Compare commits
9 Commits
master
...
quiz-answe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3125347382 | ||
|
|
4676ec9b55 | ||
|
|
c5999fb6e7 | ||
|
|
a9a9456e15 | ||
|
|
3bd543654d | ||
|
|
d87c91ee64 | ||
|
|
802b7c179f | ||
|
|
b3cd808265 | ||
|
|
2520cd7fe2 |
@ -15,3 +15,6 @@ MAILER_DSN=smtp://jv-com.mail.protection.outlook.com:25
|
|||||||
#Anonymous Complaints Email Settings
|
#Anonymous Complaints Email Settings
|
||||||
COMPLAINT_RECIPIENT_ADDRESS=chris@jv.com
|
COMPLAINT_RECIPIENT_ADDRESS=chris@jv.com
|
||||||
COMPLAINT_RECIPIENT_NAME="Chris Weiser"
|
COMPLAINT_RECIPIENT_NAME="Chris Weiser"
|
||||||
|
#Safety Quiz Result Recipients
|
||||||
|
#Enter full email addresses, separated by commas
|
||||||
|
RESULT_INBOXES=""
|
||||||
@ -39,7 +39,8 @@
|
|||||||
"symfony/validator": "6.3.*",
|
"symfony/validator": "6.3.*",
|
||||||
"symfony/web-link": "6.3.*",
|
"symfony/web-link": "6.3.*",
|
||||||
"symfony/yaml": "6.3.*",
|
"symfony/yaml": "6.3.*",
|
||||||
"twig/extra-bundle": "^2.12|^3.0",
|
"twig/cssinliner-extra": "^3.7",
|
||||||
|
"twig/extra-bundle": "^3.7",
|
||||||
"twig/twig": "^2.12|^3.0"
|
"twig/twig": "^2.12|^3.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
|||||||
426
composer.lock
generated
426
composer.lock
generated
@ -4,8 +4,84 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "5625360c4bf0ca4c404a3a47e7b43354",
|
"content-hash": "94525144f340c9dc7dd003c8b43372f0",
|
||||||
"packages": [
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "doctrine/annotations",
|
||||||
|
"version": "2.0.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/doctrine/annotations.git",
|
||||||
|
"reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f",
|
||||||
|
"reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"doctrine/lexer": "^2 || ^3",
|
||||||
|
"ext-tokenizer": "*",
|
||||||
|
"php": "^7.2 || ^8.0",
|
||||||
|
"psr/cache": "^1 || ^2 || ^3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"doctrine/cache": "^2.0",
|
||||||
|
"doctrine/coding-standard": "^10",
|
||||||
|
"phpstan/phpstan": "^1.8.0",
|
||||||
|
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
|
||||||
|
"symfony/cache": "^5.4 || ^6",
|
||||||
|
"vimeo/psalm": "^4.10"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Guilherme Blanco",
|
||||||
|
"email": "guilhermeblanco@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Roman Borschel",
|
||||||
|
"email": "roman@code-factory.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Benjamin Eberlei",
|
||||||
|
"email": "kontakt@beberlei.de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jonathan Wage",
|
||||||
|
"email": "jonwage@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Johannes Schmitt",
|
||||||
|
"email": "schmittjoh@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Docblock Annotations Parser",
|
||||||
|
"homepage": "https://www.doctrine-project.org/projects/annotations.html",
|
||||||
|
"keywords": [
|
||||||
|
"annotations",
|
||||||
|
"docblock",
|
||||||
|
"parser"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/doctrine/annotations/issues",
|
||||||
|
"source": "https://github.com/doctrine/annotations/tree/2.0.1"
|
||||||
|
},
|
||||||
|
"time": "2023-02-02T22:02:53+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/cache",
|
"name": "doctrine/cache",
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
@ -2008,6 +2084,84 @@
|
|||||||
},
|
},
|
||||||
"time": "2021-07-14T16:46:02+00:00"
|
"time": "2021-07-14T16:46:02+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "sensio/framework-extra-bundle",
|
||||||
|
"version": "v6.2.10",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git",
|
||||||
|
"reference": "2f886f4b31f23c76496901acaedfedb6936ba61f"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/2f886f4b31f23c76496901acaedfedb6936ba61f",
|
||||||
|
"reference": "2f886f4b31f23c76496901acaedfedb6936ba61f",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"doctrine/annotations": "^1.0|^2.0",
|
||||||
|
"php": ">=7.2.5",
|
||||||
|
"symfony/config": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/framework-bundle": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/http-kernel": "^4.4|^5.0|^6.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"doctrine/doctrine-cache-bundle": "<1.3.1",
|
||||||
|
"doctrine/persistence": "<1.3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"doctrine/dbal": "^2.10|^3.0",
|
||||||
|
"doctrine/doctrine-bundle": "^1.11|^2.0",
|
||||||
|
"doctrine/orm": "^2.5",
|
||||||
|
"symfony/browser-kit": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/doctrine-bridge": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/dom-crawler": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/expression-language": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/finder": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/monolog-bridge": "^4.0|^5.0|^6.0",
|
||||||
|
"symfony/monolog-bundle": "^3.2",
|
||||||
|
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0",
|
||||||
|
"symfony/security-bundle": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/twig-bundle": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/yaml": "^4.4|^5.0|^6.0",
|
||||||
|
"twig/twig": "^1.34|^2.4|^3.0"
|
||||||
|
},
|
||||||
|
"type": "symfony-bundle",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "6.1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Sensio\\Bundle\\FrameworkExtraBundle\\": "src/"
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "This bundle provides a way to configure your controllers with annotations",
|
||||||
|
"keywords": [
|
||||||
|
"annotations",
|
||||||
|
"controllers"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/sensiolabs/SensioFrameworkExtraBundle/tree/v6.2.10"
|
||||||
|
},
|
||||||
|
"abandoned": "Symfony",
|
||||||
|
"time": "2023-02-24T14:57:12+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/asset",
|
"name": "symfony/asset",
|
||||||
"version": "v6.3.0",
|
"version": "v6.3.0",
|
||||||
@ -2487,6 +2641,71 @@
|
|||||||
],
|
],
|
||||||
"time": "2023-05-29T12:49:39+00:00"
|
"time": "2023-05-29T12:49:39+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/css-selector",
|
||||||
|
"version": "v6.3.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/css-selector.git",
|
||||||
|
"reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/css-selector/zipball/88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf",
|
||||||
|
"reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\CssSelector\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jean-François Simon",
|
||||||
|
"email": "jeanfrancois.simon@sensiolabs.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Converts CSS selectors to XPath expressions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/css-selector/tree/v6.3.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-03-20T16:43:42+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/dependency-injection",
|
"name": "symfony/dependency-injection",
|
||||||
"version": "v6.3.1",
|
"version": "v6.3.1",
|
||||||
@ -7007,28 +7226,146 @@
|
|||||||
"time": "2023-04-28T13:28:14+00:00"
|
"time": "2023-04-28T13:28:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/extra-bundle",
|
"name": "tijsverkoyen/css-to-inline-styles",
|
||||||
"version": "v3.6.1",
|
"version": "2.2.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/twigphp/twig-extra-bundle.git",
|
"url": "https://github.com/tijsverkoyen/CssToInlineStyles.git",
|
||||||
"reference": "802cc2dd46ec88285d6c7fa85c26ab7f2cd5bc49"
|
"reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/twig-extra-bundle/zipball/802cc2dd46ec88285d6c7fa85c26ab7f2cd5bc49",
|
"url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/c42125b83a4fa63b187fdf29f9c93cb7733da30c",
|
||||||
"reference": "802cc2dd46ec88285d6c7fa85c26ab7f2cd5bc49",
|
"reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-dom": "*",
|
||||||
|
"ext-libxml": "*",
|
||||||
|
"php": "^5.5 || ^7.0 || ^8.0",
|
||||||
|
"symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.2.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"TijsVerkoyen\\CssToInlineStyles\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-3-Clause"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Tijs Verkoyen",
|
||||||
|
"email": "css_to_inline_styles@verkoyen.eu",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.",
|
||||||
|
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues",
|
||||||
|
"source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.6"
|
||||||
|
},
|
||||||
|
"time": "2023-01-03T09:29:04+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "twig/cssinliner-extra",
|
||||||
|
"version": "v3.7.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/twigphp/cssinliner-extra.git",
|
||||||
|
"reference": "59d107afea4ca58be35ae1386bd90b53424f3b34"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/twigphp/cssinliner-extra/zipball/59d107afea4ca58be35ae1386bd90b53424f3b34",
|
||||||
|
"reference": "59d107afea4ca58be35ae1386bd90b53424f3b34",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1.3",
|
||||||
|
"tijsverkoyen/css-to-inline-styles": "^2.0",
|
||||||
|
"twig/twig": "^2.7|^3.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/phpunit-bridge": "^5.4|^6.3"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Twig\\Extra\\CssInliner\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com",
|
||||||
|
"homepage": "http://fabien.potencier.org",
|
||||||
|
"role": "Lead Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A Twig extension to allow inlining CSS",
|
||||||
|
"homepage": "https://twig.symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"css",
|
||||||
|
"inlining",
|
||||||
|
"twig"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/twigphp/cssinliner-extra/tree/v3.7.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/twig/twig",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-07-29T15:34:56+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "twig/extra-bundle",
|
||||||
|
"version": "v3.7.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/twigphp/twig-extra-bundle.git",
|
||||||
|
"reference": "f10baafe6eb0ecd615d52d5cbfb713a39f68e8f3"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/twigphp/twig-extra-bundle/zipball/f10baafe6eb0ecd615d52d5cbfb713a39f68e8f3",
|
||||||
|
"reference": "f10baafe6eb0ecd615d52d5cbfb713a39f68e8f3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.2.5",
|
"php": ">=7.2.5",
|
||||||
"symfony/framework-bundle": "^4.4|^5.0|^6.0",
|
"symfony/framework-bundle": "^5.4|^6.0",
|
||||||
"symfony/twig-bundle": "^4.4|^5.0|^6.0",
|
"symfony/twig-bundle": "^5.4|^6.0",
|
||||||
"twig/twig": "^2.7|^3.0"
|
"twig/twig": "^2.7|^3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"league/commonmark": "^1.0|^2.0",
|
"league/commonmark": "^1.0|^2.0",
|
||||||
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0",
|
"symfony/phpunit-bridge": "^5.4|^6.3",
|
||||||
"twig/cache-extra": "^3.0",
|
"twig/cache-extra": "^3.0",
|
||||||
"twig/cssinliner-extra": "^2.12|^3.0",
|
"twig/cssinliner-extra": "^2.12|^3.0",
|
||||||
"twig/html-extra": "^2.12|^3.0",
|
"twig/html-extra": "^2.12|^3.0",
|
||||||
@ -7066,7 +7403,7 @@
|
|||||||
"twig"
|
"twig"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.6.1"
|
"source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.7.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -7078,7 +7415,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-05-06T11:11:46+00:00"
|
"time": "2023-07-29T15:34:56+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/twig",
|
"name": "twig/twig",
|
||||||
@ -8957,71 +9294,6 @@
|
|||||||
],
|
],
|
||||||
"time": "2023-04-25T10:46:17+00:00"
|
"time": "2023-04-25T10:46:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "symfony/css-selector",
|
|
||||||
"version": "v6.3.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/symfony/css-selector.git",
|
|
||||||
"reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf",
|
|
||||||
"reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=8.1"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Symfony\\Component\\CssSelector\\": ""
|
|
||||||
},
|
|
||||||
"exclude-from-classmap": [
|
|
||||||
"/Tests/"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Fabien Potencier",
|
|
||||||
"email": "fabien@symfony.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Jean-François Simon",
|
|
||||||
"email": "jeanfrancois.simon@sensiolabs.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Symfony Community",
|
|
||||||
"homepage": "https://symfony.com/contributors"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Converts CSS selectors to XPath expressions",
|
|
||||||
"homepage": "https://symfony.com",
|
|
||||||
"support": {
|
|
||||||
"source": "https://github.com/symfony/css-selector/tree/v6.3.0"
|
|
||||||
},
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"url": "https://symfony.com/sponsor",
|
|
||||||
"type": "custom"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://github.com/fabpot",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
|
||||||
"type": "tidelift"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"time": "2023-03-20T16:43:42+00:00"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "symfony/debug-bundle",
|
"name": "symfony/debug-bundle",
|
||||||
"version": "v6.3.0",
|
"version": "v6.3.0",
|
||||||
|
|||||||
@ -7,12 +7,12 @@ Questions:
|
|||||||
# Choices:
|
# Choices:
|
||||||
# - {Label: "[Text for this label]", Value: [True/False representing if this is the correct answer]}
|
# - {Label: "[Text for this label]", Value: [True/False representing if this is the correct answer]}
|
||||||
# - {Label: "[Text for this label]", Value: [True/False representing if this is the correct answer]}
|
# - {Label: "[Text for this label]", Value: [True/False representing if this is the correct answer]}
|
||||||
Question_1:
|
Q1:
|
||||||
Text: "Some safety topics in J.V. Manufacturing Safety Orientation Training are General Safety, Safe Lifting, Fall Protection and Forklift Training."
|
Text: "Some safety topics in J.V. Manufacturing Safety Orientation Training are General Safety, Safe Lifting, Fall Protection and Forklift Training."
|
||||||
Choices:
|
Choices:
|
||||||
- {Label: "True", Value: true}
|
- {Label: "True", Value: true}
|
||||||
- {Label: "False", Value: false}
|
- {Label: "False", Value: false}
|
||||||
Question2:
|
Q2:
|
||||||
Text: "Accidents are caused by:"
|
Text: "Accidents are caused by:"
|
||||||
Choices:
|
Choices:
|
||||||
- {Label: "Unsafe acts of another employee.", Value: False}
|
- {Label: "Unsafe acts of another employee.", Value: False}
|
||||||
|
|||||||
@ -11,4 +11,5 @@ return [
|
|||||||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
||||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||||
|
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -16,7 +16,7 @@ framework:
|
|||||||
# sync: 'sync://'
|
# sync: 'sync://'
|
||||||
|
|
||||||
routing:
|
routing:
|
||||||
Symfony\Component\Mailer\Messenger\SendEmailMessage: async
|
#Symfony\Component\Mailer\Messenger\SendEmailMessage: async
|
||||||
Symfony\Component\Notifier\Message\ChatMessage: async
|
Symfony\Component\Notifier\Message\ChatMessage: async
|
||||||
Symfony\Component\Notifier\Message\SmsMessage: async
|
Symfony\Component\Notifier\Message\SmsMessage: async
|
||||||
|
|
||||||
|
|||||||
3
config/packages/sensio_framework_extra.yaml
Normal file
3
config/packages/sensio_framework_extra.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
sensio_framework_extra:
|
||||||
|
router:
|
||||||
|
annotations: false
|
||||||
@ -2,6 +2,9 @@
|
|||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
use App\Form\SafetyQuizType;
|
use App\Form\SafetyQuizType;
|
||||||
|
use Egulias\EmailValidator\Warning\Warning;
|
||||||
|
use Error;
|
||||||
|
use phpDocumentor\Reflection\Types\Boolean;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
@ -9,6 +12,12 @@ use Symfony\Component\Yaml\Yaml;
|
|||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
use Symfony\Component\Form\FormInterface;
|
||||||
|
use Symfony\Component\Mime\Address;
|
||||||
|
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
|
||||||
|
use Symfony\Component\DependencyInjection\Exception\EnvParameterException;
|
||||||
|
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
||||||
|
use Symfony\Component\Mailer\MailerInterface;
|
||||||
|
|
||||||
use function PHPUnit\Framework\containsIdentical;
|
use function PHPUnit\Framework\containsIdentical;
|
||||||
|
|
||||||
@ -21,7 +30,7 @@ class SafetyController extends AbstractController
|
|||||||
return $this->render('Training/Safety/safetyHome.html.twig',['content' => $contentFile]);
|
return $this->render('Training/Safety/safetyHome.html.twig',['content' => $contentFile]);
|
||||||
}
|
}
|
||||||
#[Route('/training/safety/quiz')]
|
#[Route('/training/safety/quiz')]
|
||||||
public function Quiz(Request $request, LoggerInterface $log)
|
public function Quiz(Request $request, LoggerInterface $log, MailerInterface $mailer)
|
||||||
{
|
{
|
||||||
$form = $this->createForm(SafetyQuizType::class);
|
$form = $this->createForm(SafetyQuizType::class);
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
@ -40,6 +49,7 @@ class SafetyController extends AbstractController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$log->Debug($testerName . ' quiz answers correct: ' . $correctAnswers);
|
$log->Debug($testerName . ' quiz answers correct: ' . $correctAnswers);
|
||||||
|
$this->sendQuizResults($correctAnswers, $form, $mailer, $log);
|
||||||
return $this->render('Training/Safety/quizResults.html.twig', ['testerName'=>$testerName,
|
return $this->render('Training/Safety/quizResults.html.twig', ['testerName'=>$testerName,
|
||||||
'correctAnswers'=>$correctAnswers, 'totalAnswers'=>count($data)]);
|
'correctAnswers'=>$correctAnswers, 'totalAnswers'=>count($data)]);
|
||||||
}
|
}
|
||||||
@ -104,4 +114,74 @@ class SafetyController extends AbstractController
|
|||||||
|
|
||||||
return new Response($header . $navButtons . $contents);
|
return new Response($header . $navButtons . $contents);
|
||||||
}
|
}
|
||||||
|
//Send an email with the quiz results
|
||||||
|
public function sendQuizResults(int $answersCorrect, FormInterface $submittedQuiz, MailerInterface $mailer, LoggerInterface $log)
|
||||||
|
{
|
||||||
|
//Fetch array of mail inboxes to send messages to.
|
||||||
|
//If env var doesn't exist then fail gracefully
|
||||||
|
$recipients = []; //X: keep in method's scope
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$recipients = explode(",", $_SERVER['RESULT_INBOXES']);
|
||||||
|
}
|
||||||
|
catch (EnvParameterException $e)
|
||||||
|
{
|
||||||
|
$log->warning("safety Quiz Submission: Environment Variable RESULT_INBOXES not configured. Quiz results will not be emailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//If no inboxes configured, cancel
|
||||||
|
if(count($recipients) <= 0)
|
||||||
|
{
|
||||||
|
$log->warning("Safety Quiz Submission: No email recipients configured");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Prepare payload data
|
||||||
|
$submittedData = $submittedQuiz->getData();
|
||||||
|
$submission = [];
|
||||||
|
$quiz = Yaml::parseFile('../config/SafetyQuiz.yaml', 2, 2, Yaml::PARSE_OBJECT_FOR_MAP)['Questions'];
|
||||||
|
$questionKeys = array_keys($quiz);
|
||||||
|
foreach($questionKeys as $key)
|
||||||
|
{
|
||||||
|
$questionData = [];
|
||||||
|
$questionData += ['key'=>$key, 'text'=>$quiz[$key]['Text']];
|
||||||
|
$answer = null;
|
||||||
|
foreach($quiz[$key]['Choices'] as $choice)
|
||||||
|
{
|
||||||
|
if($choice['Value'])
|
||||||
|
{
|
||||||
|
$answer = $choice;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$questionData += ['answer'=>$answer, 'submittedAnswer'=>$submittedData[$key]];
|
||||||
|
$submission += $questionData;
|
||||||
|
$quiz[$key] += ['submittedAnswer'=>$submittedData[$key], 'answer'=>$answer];
|
||||||
|
}
|
||||||
|
//var_dump($submission);
|
||||||
|
//Build & send the email
|
||||||
|
$email = (new TemplatedEmail())
|
||||||
|
->from(new Address('noreply@jv.com', 'Internal'))
|
||||||
|
->to(new Address("ajensen@jv.com"))
|
||||||
|
->subject('Safety Quiz Submission')
|
||||||
|
->htmlTemplate('Emails/safetyQuizResults.html.twig')
|
||||||
|
->context([
|
||||||
|
'submission' => $quiz,
|
||||||
|
'answersCorrect' => $answersCorrect,
|
||||||
|
'totalQuestions' => count($questionKeys),
|
||||||
|
'submitterName' => $submittedData['Name']])
|
||||||
|
;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$log->info("Sending Quiz Results...");
|
||||||
|
$mailer->send($email);
|
||||||
|
}
|
||||||
|
catch (TransportExceptionInterface $e)
|
||||||
|
{
|
||||||
|
$log->error("Failed to email quiz results");
|
||||||
|
$log->error($e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
21
symfony.lock
21
symfony.lock
@ -1,4 +1,13 @@
|
|||||||
{
|
{
|
||||||
|
"doctrine/annotations": {
|
||||||
|
"version": "2.0",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "main",
|
||||||
|
"version": "1.10",
|
||||||
|
"ref": "64d8583af5ea57b7afa4aba4b159907f3a148b05"
|
||||||
|
}
|
||||||
|
},
|
||||||
"doctrine/doctrine-bundle": {
|
"doctrine/doctrine-bundle": {
|
||||||
"version": "2.10",
|
"version": "2.10",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
@ -40,6 +49,18 @@
|
|||||||
"tests/bootstrap.php"
|
"tests/bootstrap.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"sensio/framework-extra-bundle": {
|
||||||
|
"version": "6.2",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "main",
|
||||||
|
"version": "5.2",
|
||||||
|
"ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"config/packages/sensio_framework_extra.yaml"
|
||||||
|
]
|
||||||
|
},
|
||||||
"symfony/console": {
|
"symfony/console": {
|
||||||
"version": "6.3",
|
"version": "6.3",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
|
|||||||
53
templates/Emails/safetyQuizResults.html.twig
Normal file
53
templates/Emails/safetyQuizResults.html.twig
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
{% apply inline_css %}
|
||||||
|
<style>
|
||||||
|
.correct
|
||||||
|
{
|
||||||
|
background-color: #9dff96;
|
||||||
|
}
|
||||||
|
.incorrect
|
||||||
|
{
|
||||||
|
background-color: #ff9696;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<h1>A Quiz-taker has submitted the J.V. Safety Quiz <h1>
|
||||||
|
<h2> {{ submitterName }} has completed the quiz, scoring {{answersCorrect}}/{{totalQuestions}} correct.</h2>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1">#</td>
|
||||||
|
<td colspan="4">Question</td>
|
||||||
|
<td colspan="2">Submitted Answer</td>
|
||||||
|
<td colspan="2">Correct Answer</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for key,question in submission %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% if key != null %}
|
||||||
|
{{key}}</td>
|
||||||
|
{% else %}
|
||||||
|
N/A
|
||||||
|
{% endif %}
|
||||||
|
<td>
|
||||||
|
{% if question["Text"] != null %}
|
||||||
|
{{question["Text"]}}
|
||||||
|
{% else %}
|
||||||
|
N/A
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td class="{{ (question['submittedAnswer']==true)? 'correct': 'incorrect' }}">
|
||||||
|
{{question['submittedAnswer']}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if question['answer']['Label'] != null %}
|
||||||
|
{{question['answer']['Label']}}
|
||||||
|
{% else %}
|
||||||
|
N/A
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endapply %}
|
||||||
Loading…
x
Reference in New Issue
Block a user