diff --git a/api/composer.json b/api/composer.json
index 7d1d890..0afc79e 100644
--- a/api/composer.json
+++ b/api/composer.json
@@ -12,11 +12,14 @@
"doctrine/doctrine-bundle": "^2.7",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.13",
+ "erusev/parsedown": "^1.7",
"nelmio/cors-bundle": "^2.2",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.8",
"symfony/asset": "6.1.*",
"symfony/console": "6.1.*",
+ "symfony/css-selector": "6.1.*",
+ "symfony/dom-crawler": "6.1.*",
"symfony/dotenv": "6.1.*",
"symfony/expression-language": "6.1.*",
"symfony/flex": "^2",
diff --git a/api/composer.lock b/api/composer.lock
index 3a31591..af0c2d7 100644
--- a/api/composer.lock
+++ b/api/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "e37868c5abf2af1b85d9004a4566d5e7",
+ "content-hash": "26cefb262f9642ce073a4cd5365af8ea",
"packages": [
{
"name": "api-platform/core",
@@ -1541,6 +1541,56 @@
},
"time": "2022-05-23T21:33:49+00:00"
},
+ {
+ "name": "erusev/parsedown",
+ "version": "1.7.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/erusev/parsedown.git",
+ "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
+ "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
+ "shasum": ""
+ },
+ "require": {
+ "ext-mbstring": "*",
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Parsedown": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Emanuil Rusev",
+ "email": "hello@erusev.com",
+ "homepage": "http://erusev.com"
+ }
+ ],
+ "description": "Parser for Markdown.",
+ "homepage": "http://parsedown.org",
+ "keywords": [
+ "markdown",
+ "parser"
+ ],
+ "support": {
+ "issues": "https://github.com/erusev/parsedown/issues",
+ "source": "https://github.com/erusev/parsedown/tree/1.7.x"
+ },
+ "time": "2019-12-30T22:54:17+00:00"
+ },
{
"name": "fig/link-util",
"version": "1.2.0",
@@ -1750,6 +1800,75 @@
],
"time": "2022-07-28T22:46:52+00:00"
},
+ {
+ "name": "masterminds/html5",
+ "version": "2.7.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Masterminds/html5-php.git",
+ "reference": "897eb517a343a2281f11bc5556d6548db7d93947"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947",
+ "reference": "897eb517a343a2281f11bc5556d6548db7d93947",
+ "shasum": ""
+ },
+ "require": {
+ "ext-ctype": "*",
+ "ext-dom": "*",
+ "ext-libxml": "*",
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Masterminds\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Matt Butcher",
+ "email": "technosophos@gmail.com"
+ },
+ {
+ "name": "Matt Farina",
+ "email": "matt@mattfarina.com"
+ },
+ {
+ "name": "Asmir Mustafic",
+ "email": "goetas@gmail.com"
+ }
+ ],
+ "description": "An HTML5 parser and serializer.",
+ "homepage": "http://masterminds.github.io/html5-php",
+ "keywords": [
+ "HTML5",
+ "dom",
+ "html",
+ "parser",
+ "querypath",
+ "serializer",
+ "xml"
+ ],
+ "support": {
+ "issues": "https://github.com/Masterminds/html5-php/issues",
+ "source": "https://github.com/Masterminds/html5-php/tree/2.7.6"
+ },
+ "time": "2022-08-18T16:18:26+00:00"
+ },
{
"name": "nelmio/cors-bundle",
"version": "2.2.0",
@@ -2694,6 +2813,71 @@
],
"time": "2022-08-26T10:32:31+00:00"
},
+ {
+ "name": "symfony/css-selector",
+ "version": "v6.1.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/css-selector.git",
+ "reference": "0dd5e36b80e1de97f8f74ed7023ac2b837a36443"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/0dd5e36b80e1de97f8f74ed7023ac2b837a36443",
+ "reference": "0dd5e36b80e1de97f8f74ed7023ac2b837a36443",
+ "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.1.3"
+ },
+ "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": "2022-06-27T17:24:16+00:00"
+ },
{
"name": "symfony/dependency-injection",
"version": "v6.1.3",
@@ -2963,6 +3147,76 @@
],
"time": "2022-07-29T07:42:06+00:00"
},
+ {
+ "name": "symfony/dom-crawler",
+ "version": "v6.1.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/dom-crawler.git",
+ "reference": "8cb4c6e6c8d30c26f70529ed5e50d79a09576c0c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/8cb4c6e6c8d30c26f70529ed5e50d79a09576c0c",
+ "reference": "8cb4c6e6c8d30c26f70529ed5e50d79a09576c0c",
+ "shasum": ""
+ },
+ "require": {
+ "masterminds/html5": "^2.6",
+ "php": ">=8.1",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-mbstring": "~1.0"
+ },
+ "require-dev": {
+ "symfony/css-selector": "^5.4|^6.0"
+ },
+ "suggest": {
+ "symfony/css-selector": ""
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\DomCrawler\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Eases DOM navigation for HTML and XML documents",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/dom-crawler/tree/v6.1.4"
+ },
+ "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": "2022-08-04T19:19:00+00:00"
+ },
{
"name": "symfony/dotenv",
"version": "v6.1.0",
diff --git a/api/config/fixtures/quizzes/1_CSS_quiz/1_padding_properties.md b/api/config/fixtures/quizzes/1_CSS_quiz/1_padding_properties.md
new file mode 100644
index 0000000..47261db
--- /dev/null
+++ b/api/config/fixtures/quizzes/1_CSS_quiz/1_padding_properties.md
@@ -0,0 +1,30 @@
+# This is the question
+
+An example
+
+```php
+
+
+ Answer: 5 +
+ \ No newline at end of file diff --git a/api/config/fixtures/quizzes/1_CSS_quiz/2_style_override.md b/api/config/fixtures/quizzes/1_CSS_quiz/2_style_override.md new file mode 100644 index 0000000..4f49f13 --- /dev/null +++ b/api/config/fixtures/quizzes/1_CSS_quiz/2_style_override.md @@ -0,0 +1,15 @@ +--- + +--- + +In CSS which rule overrides a previous style? + +- [ ] important +- [ ] !important +- [ ] important! + ++ Answer: !important +
++ Answer: font-family +
+
+ Answer: background-repeat: repeat
+
+ Answer: text-decoration: none
+