diff --git a/Pipfile.lock b/Pipfile.lock index 5ab1769..ab3753a 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -196,7 +196,7 @@ "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15", "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c" ], - "markers": "python_version >= '3.6'", + "markers": "python_full_version <= '3.11.2'", "version": "==4.0.2" }, "asyncpg": { @@ -480,7 +480,7 @@ "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df", "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab" ], - "markers": "python_full_version >= '3.7.0'", + "markers": "python_version >= '3.7'", "version": "==3.1.0" }, "click": { @@ -562,6 +562,14 @@ "index": "pypi", "version": "==2.0.0.post2" }, + "exceptiongroup": { + "hashes": [ + "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e", + "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785" + ], + "markers": "python_version < '3.11'", + "version": "==1.1.1" + }, "fastapi": { "hashes": [ "sha256:71232d47c2787446991c81c41c249f8a16238d52d779c0e6b43927d3773dbe3c", @@ -1462,7 +1470,7 @@ "sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7", "sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21" ], - "markers": "python_version >= '3.6' and python_version < '4'", + "markers": "python_version >= '3.6' and python_version < '4.0'", "version": "==4.9" }, "scheduler": { @@ -2100,7 +2108,7 @@ "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df", "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab" ], - "markers": "python_full_version >= '3.7.0'", + "markers": "python_version >= '3.7'", "version": "==3.1.0" }, "click": { diff --git a/classquiz/oauth/init_oauth.py b/classquiz/oauth/init_oauth.py index bd6eee1..77e2656 100644 --- a/classquiz/oauth/init_oauth.py +++ b/classquiz/oauth/init_oauth.py @@ -33,7 +33,8 @@ def init_oauth() -> OAuth: client_secret=settings.github_client_secret, ) if ( - settings.custom_openid_provider.client_id is not None + settings.custom_openid_provider is not None + and settings.custom_openid_provider.client_id is not None and settings.custom_openid_provider.client_secret is not None ): oauth.register( diff --git a/frontend/src/routes/docs/(markdown)/quiz/question-types/+page.svx b/frontend/src/routes/docs/(markdown)/quiz/question-types/+page.svx new file mode 100644 index 0000000..312e692 --- /dev/null +++ b/frontend/src/routes/docs/(markdown)/quiz/question-types/+page.svx @@ -0,0 +1,8 @@ +# Question Types + +- [Range](/docs/quiz/question-types/range) +- [Multiple Choice](/docs/quiz/question-types/multiple-choice) +- [Voting](/docs/quiz/question-types/voting) +- [Text](/docs/quiz/question-types/text) +- [Order](/docs/quiz/question-types/order) +- [Check Choice](/docs/quiz/question-types/check-choice) diff --git a/frontend/src/routes/docs/(markdown)/quiz/question-types/check-choice/+page.svx b/frontend/src/routes/docs/(markdown)/quiz/question-types/check-choice/+page.svx new file mode 100644 index 0000000..819431a --- /dev/null +++ b/frontend/src/routes/docs/(markdown)/quiz/question-types/check-choice/+page.svx @@ -0,0 +1,11 @@ +# Check Choice + +## Summary +- Interface similar to [Multiple Choice](/docs/quiz/question-types/multiple-choice) +- Up to 4 answers +- All answers marked as correct have to be selected +- No points if only one correct one is selected + +## Use case +- Select all correct statements +- Select all correct nicknames diff --git a/frontend/src/routes/docs/(markdown)/quiz/question-types/multiple-choice/+page.svx b/frontend/src/routes/docs/(markdown)/quiz/question-types/multiple-choice/+page.svx new file mode 100644 index 0000000..2fd000f --- /dev/null +++ b/frontend/src/routes/docs/(markdown)/quiz/question-types/multiple-choice/+page.svx @@ -0,0 +1,9 @@ +# Multiple Choice + +## Summary +- The standard question type everyone knows +- 1-4 answers can be correct +- User can only choose one answer + +## Use case +Nothing specific; Main component of a quiz diff --git a/frontend/src/routes/docs/(markdown)/quiz/question-types/order/+page.svx b/frontend/src/routes/docs/(markdown)/quiz/question-types/order/+page.svx new file mode 100644 index 0000000..c0616a2 --- /dev/null +++ b/frontend/src/routes/docs/(markdown)/quiz/question-types/order/+page.svx @@ -0,0 +1,9 @@ +# Order + +## Summary +- Bring the answers in a correct order +- The order gets randomized before the quiz so that every player has the same random order +- Remember to give some time, since it's kinda slow to move the answers up and down + +## Use case +- Order historic events diff --git a/frontend/src/routes/docs/(markdown)/quiz/question-types/range/+page.svx b/frontend/src/routes/docs/(markdown)/quiz/question-types/range/+page.svx new file mode 100644 index 0000000..a4de10f --- /dev/null +++ b/frontend/src/routes/docs/(markdown)/quiz/question-types/range/+page.svx @@ -0,0 +1,10 @@ +# Range Answers + +## Summary +- The player has a slider where a number can be set +- The creator can choose the range and the correct range + +## Use case +- Guessing a year +- Guessing the population of a country +- Guessing in general diff --git a/frontend/src/routes/docs/(markdown)/quiz/question-types/text/+page.svx b/frontend/src/routes/docs/(markdown)/quiz/question-types/text/+page.svx new file mode 100644 index 0000000..ec8bc43 --- /dev/null +++ b/frontend/src/routes/docs/(markdown)/quiz/question-types/text/+page.svx @@ -0,0 +1,9 @@ +# Text + +## Summary +- Players can enter text +- 4 different correct solutions can be given +- case sensitivity can be set per answer + +## Use case +- Test if a name is remembered correctly diff --git a/frontend/src/routes/docs/(markdown)/quiz/question-types/voting/+page.svx b/frontend/src/routes/docs/(markdown)/quiz/question-types/voting/+page.svx new file mode 100644 index 0000000..99cf20c --- /dev/null +++ b/frontend/src/routes/docs/(markdown)/quiz/question-types/voting/+page.svx @@ -0,0 +1,10 @@ +# Voting + +## Summary +- Like [Multiple Choice](/docs/quiz/question-types/multiple-choice) +- No points +- No correct answers +- Bar graph shows how many voted for what + +## Use case +- Get the opinion of the audience