diff --git a/classquiz/__init__.py b/classquiz/__init__.py index 13494e0..e633370 100644 --- a/classquiz/__init__.py +++ b/classquiz/__init__.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import sentry_sdk from fastapi import FastAPI, Request from sentry_sdk.integrations.redis import RedisIntegration diff --git a/classquiz/auth.py b/classquiz/auth.py index 7fef58b..4998c74 100644 --- a/classquiz/auth.py +++ b/classquiz/auth.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from datetime import timedelta from typing import Dict from typing import Optional diff --git a/classquiz/cache.py b/classquiz/cache.py index 4d40c13..cc9bec3 100644 --- a/classquiz/cache.py +++ b/classquiz/cache.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import uuid from json import loads from typing import Union diff --git a/classquiz/config.py b/classquiz/config.py index b26db82..3652fba 100644 --- a/classquiz/config.py +++ b/classquiz/config.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from functools import lru_cache from redis import asyncio as redis_lib diff --git a/classquiz/db/__init__.py b/classquiz/db/__init__.py index b625755..cc00f70 100644 --- a/classquiz/db/__init__.py +++ b/classquiz/db/__init__.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import databases import sqlalchemy diff --git a/classquiz/db/models.py b/classquiz/db/models.py index a02dd18..430f454 100644 --- a/classquiz/db/models.py +++ b/classquiz/db/models.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import uuid from datetime import datetime from typing import Optional diff --git a/classquiz/emails/__init__.py b/classquiz/emails/__init__.py index 995d86f..64d5c98 100644 --- a/classquiz/emails/__init__.py +++ b/classquiz/emails/__init__.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import os import smtplib import ssl diff --git a/classquiz/helpers/__init__.py b/classquiz/helpers/__init__.py index 22be197..6b1f648 100644 --- a/classquiz/helpers/__init__.py +++ b/classquiz/helpers/__init__.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import asyncio from typing import Optional diff --git a/classquiz/helpers/hashcash.py b/classquiz/helpers/hashcash.py index d7eda5f..b589abc 100644 --- a/classquiz/helpers/hashcash.py +++ b/classquiz/helpers/hashcash.py @@ -33,6 +33,10 @@ Notice that '_mint()' behaves deterministically, finding the same suffix every time it is passed the same arguments. 'mint()' incorporates a random salt in stamps (as per the hashcash v.1 protocol). """ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from string import ascii_letters from math import ceil, floor import hashlib diff --git a/classquiz/kahoot_importer/__init__.py b/classquiz/kahoot_importer/__init__.py index d5e7a80..b60be28 100644 --- a/classquiz/kahoot_importer/__init__.py +++ b/classquiz/kahoot_importer/__init__.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from typing import List, Any, Optional from uuid import UUID diff --git a/classquiz/kahoot_importer/get.py b/classquiz/kahoot_importer/get.py index fae9a71..0ad3278 100644 --- a/classquiz/kahoot_importer/get.py +++ b/classquiz/kahoot_importer/get.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from aiohttp import ClientSession from pydantic import BaseModel diff --git a/classquiz/kahoot_importer/import_quiz.py b/classquiz/kahoot_importer/import_quiz.py index 6728e02..100cc25 100644 --- a/classquiz/kahoot_importer/import_quiz.py +++ b/classquiz/kahoot_importer/import_quiz.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import html import json import uuid diff --git a/classquiz/kahoot_importer/search.py b/classquiz/kahoot_importer/search.py index a2807df..28d3d0c 100644 --- a/classquiz/kahoot_importer/search.py +++ b/classquiz/kahoot_importer/search.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from typing import List from aiohttp import ClientSession diff --git a/classquiz/oauth/__init__.py b/classquiz/oauth/__init__.py index b1c9956..db7a4f9 100644 --- a/classquiz/oauth/__init__.py +++ b/classquiz/oauth/__init__.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from fastapi import APIRouter from classquiz.oauth import google, github diff --git a/classquiz/oauth/authenticate_user.py b/classquiz/oauth/authenticate_user.py index b249937..ea8df1e 100644 --- a/classquiz/oauth/authenticate_user.py +++ b/classquiz/oauth/authenticate_user.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from classquiz.db.models import User, UserSession from fastapi import Response, Request, HTTPException import os diff --git a/classquiz/oauth/github.py b/classquiz/oauth/github.py index 925f31d..c3cde37 100644 --- a/classquiz/oauth/github.py +++ b/classquiz/oauth/github.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from typing import Optional import authlib.integrations.base_client diff --git a/classquiz/oauth/google.py b/classquiz/oauth/google.py index 57b9476..3ada118 100644 --- a/classquiz/oauth/google.py +++ b/classquiz/oauth/google.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from fastapi import APIRouter, Request, HTTPException, Response from classquiz.config import settings diff --git a/classquiz/oauth/init_oauth.py b/classquiz/oauth/init_oauth.py index 62944fa..8ca3190 100644 --- a/classquiz/oauth/init_oauth.py +++ b/classquiz/oauth/init_oauth.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from authlib.integrations.starlette_client import OAuth from classquiz.config import settings from functools import lru_cache diff --git a/classquiz/routers/__init__.py b/classquiz/routers/__init__.py index e69de29..c314c5c 100644 --- a/classquiz/routers/__init__.py +++ b/classquiz/routers/__init__.py @@ -0,0 +1,3 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. diff --git a/classquiz/routers/editor.py b/classquiz/routers/editor.py index b46cbcc..cfd356a 100644 --- a/classquiz/routers/editor.py +++ b/classquiz/routers/editor.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import asyncio import html import re diff --git a/classquiz/routers/quiz.py b/classquiz/routers/quiz.py index 9b87484..0a05362 100644 --- a/classquiz/routers/quiz.py +++ b/classquiz/routers/quiz.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import json import re import uuid diff --git a/classquiz/routers/search.py b/classquiz/routers/search.py index f62fe5f..950c8fc 100644 --- a/classquiz/routers/search.py +++ b/classquiz/routers/search.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import pydantic from fastapi import APIRouter diff --git a/classquiz/routers/stats.py b/classquiz/routers/stats.py index 7094086..4eb9772 100644 --- a/classquiz/routers/stats.py +++ b/classquiz/routers/stats.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from fastapi import APIRouter from classquiz.config import redis diff --git a/classquiz/routers/storage.py b/classquiz/routers/storage.py index d925a55..e363661 100644 --- a/classquiz/routers/storage.py +++ b/classquiz/routers/storage.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import re from fastapi import APIRouter, HTTPException diff --git a/classquiz/routers/testing_routes.py b/classquiz/routers/testing_routes.py index be11eba..a143f7b 100644 --- a/classquiz/routers/testing_routes.py +++ b/classquiz/routers/testing_routes.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from fastapi import APIRouter from classquiz.db.models import User from classquiz.config import settings diff --git a/classquiz/routers/users.py b/classquiz/routers/users.py index 76cfcef..ad59660 100644 --- a/classquiz/routers/users.py +++ b/classquiz/routers/users.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import os import ormar diff --git a/classquiz/routers/utils.py b/classquiz/routers/utils.py index d628d73..e4c17b9 100644 --- a/classquiz/routers/utils.py +++ b/classquiz/routers/utils.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import io import qrcode diff --git a/classquiz/socket_server/__init__.py b/classquiz/socket_server/__init__.py index e27f0d0..5bba9ed 100644 --- a/classquiz/socket_server/__init__.py +++ b/classquiz/socket_server/__init__.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import json import os diff --git a/classquiz/storage/__init__.py b/classquiz/storage/__init__.py index c45ec7f..fec2bfb 100644 --- a/classquiz/storage/__init__.py +++ b/classquiz/storage/__init__.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from io import BytesIO from typing import Optional diff --git a/classquiz/storage/deta_storage.py b/classquiz/storage/deta_storage.py index d86c356..62aaf04 100644 --- a/classquiz/storage/deta_storage.py +++ b/classquiz/storage/deta_storage.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from io import BytesIO from classquiz.storage.errors import DeletionFailedError, SavingFailedError, DownloadingFailedError diff --git a/classquiz/storage/errors.py b/classquiz/storage/errors.py index ccbd115..f0d5199 100644 --- a/classquiz/storage/errors.py +++ b/classquiz/storage/errors.py @@ -1,3 +1,8 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + + class DeletionFailedError(Exception): pass diff --git a/classquiz/storage/local_storage.py b/classquiz/storage/local_storage.py index dadaa39..e75dbdd 100644 --- a/classquiz/storage/local_storage.py +++ b/classquiz/storage/local_storage.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import io import os diff --git a/classquiz/tests/__init__.py b/classquiz/tests/__init__.py index 35982af..ed7190b 100644 --- a/classquiz/tests/__init__.py +++ b/classquiz/tests/__init__.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + from typing import Generator from fastapi.testclient import TestClient diff --git a/classquiz/tests/test_auth.py b/classquiz/tests/test_auth.py index dc5bb19..59282ac 100644 --- a/classquiz/tests/test_auth.py +++ b/classquiz/tests/test_auth.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import pytest from classquiz.auth import get_password_hash, verify_password, settings, ALGORITHM, create_access_token from jose import JWTError, jwt diff --git a/classquiz/tests/test_kahoot_get.py b/classquiz/tests/test_kahoot_get.py index 25df85d..3fc1e0f 100644 --- a/classquiz/tests/test_kahoot_get.py +++ b/classquiz/tests/test_kahoot_get.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import pytest from classquiz.kahoot_importer.get import get diff --git a/classquiz/tests/test_kahoot_import.py b/classquiz/tests/test_kahoot_import.py index 0bdb3a8..9cf5ee7 100644 --- a/classquiz/tests/test_kahoot_import.py +++ b/classquiz/tests/test_kahoot_import.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import pytest from classquiz.kahoot_importer.import_quiz import _download_image diff --git a/classquiz/tests/test_kahoot_search.py b/classquiz/tests/test_kahoot_search.py index 0768a17..ba4e794 100644 --- a/classquiz/tests/test_kahoot_search.py +++ b/classquiz/tests/test_kahoot_search.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import pytest from classquiz.kahoot_importer.search import search diff --git a/classquiz/tests/test_server.py b/classquiz/tests/test_server.py index 52510e1..c1055cd 100644 --- a/classquiz/tests/test_server.py +++ b/classquiz/tests/test_server.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import uuid import pytest diff --git a/classquiz/tests/test_storage.py b/classquiz/tests/test_storage.py index adc26b7..24ee75f 100644 --- a/classquiz/tests/test_storage.py +++ b/classquiz/tests/test_storage.py @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + import pytest from classquiz.config import settings diff --git a/frontend/.eslintrc.cjs b/frontend/.eslintrc.cjs index 13cace5..626548b 100644 --- a/frontend/.eslintrc.cjs +++ b/frontend/.eslintrc.cjs @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + module.exports = { root: true, parser: '@typescript-eslint/parser', diff --git a/frontend/i18next-scanner.config.engine.cjs b/frontend/i18next-scanner.config.engine.cjs index ad60520..bc80621 100644 --- a/frontend/i18next-scanner.config.engine.cjs +++ b/frontend/i18next-scanner.config.engine.cjs @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + module.exports = { options: { debug: true, diff --git a/frontend/postcss.config.cjs b/frontend/postcss.config.cjs index 2b390fd..a9b2322 100644 --- a/frontend/postcss.config.cjs +++ b/frontend/postcss.config.cjs @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + const tailwindcss = require('tailwindcss'); const autoprefixer = require('autoprefixer'); const cssnano = require('cssnano'); diff --git a/frontend/src/app.css b/frontend/src/app.css index e24391a..420b903 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + /* Write your global styles here, in PostCSS syntax */ @tailwind base; @tailwind components; diff --git a/frontend/src/app.d.ts b/frontend/src/app.d.ts index e69de29..780fa14 100644 --- a/frontend/src/app.d.ts +++ b/frontend/src/app.d.ts @@ -0,0 +1,5 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ diff --git a/frontend/src/app.html b/frontend/src/app.html index 0b35b71..6b04749 100644 --- a/frontend/src/app.html +++ b/frontend/src/app.html @@ -1,3 +1,9 @@ + +
diff --git a/frontend/src/hooks.ts b/frontend/src/hooks.ts index 27979c0..9b6b68f 100644 --- a/frontend/src/hooks.ts +++ b/frontend/src/hooks.ts @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + import * as cookie from 'cookie'; import Redis from 'ioredis'; diff --git a/frontend/src/lib/Map.svelte b/frontend/src/lib/Map.svelte index 009623e..2bd0781 100644 --- a/frontend/src/lib/Map.svelte +++ b/frontend/src/lib/Map.svelte @@ -1,3 +1,8 @@ + + + {#if open}