Code Monkey home page Code Monkey logo

mawoka-myblock / classquiz Goto Github PK

View Code? Open in Web Editor NEW
425.0 10.0 77.0 7.28 MB

ClassQuiz is a quiz-application like Kahoot!, but open-source.

Home Page: https://classquiz.de

License: Mozilla Public License 2.0

Python 36.98% JavaScript 0.82% CSS 0.28% HTML 0.13% TypeScript 4.45% Svelte 55.69% Dockerfile 0.28% Shell 0.26% Jinja 1.05% Mako 0.07%
kahoot tailwindcss fastapi ormar education socket-io i18n svelte sveltekit edu educational-software hacktoberfest

classquiz's Introduction

GitHub Repo stars GitHub contributors GitHub forks GitHub issues GitHub GitHub code size in bytes DeepSource Snky badge codecov

ClassQuiz

ClassQuiz Logo

The open-source quiz-platform!
Visit the website »

Docs · Register · Self-Hosting · Matrix Space

About ClassQuiz

ClassQuiz is a quiz app to learn interactively for students, but open-source which is very important if it is a product for educational purposes. You can create quizzes and play them remotely with other people. It is mainly made for teachers who create a quiz, so students can compete with their knowledge against each other.

Try it

There is a hosted version at classquiz.de. The server is located in Karlsruhe, Germany and hosted by netcup, so expect some latency depending on your location.

Help/Community

Join our Matrix Space using element!

Donating

ko-fi

Self-Host

Please see https://classquiz.de/docs/self-host

Development

See https://classquiz.de/docs/develop

Translation

ClassQuiz uses hosted Weblate

Übersetzungsstatus

Docs

The docs are online at https://classquiz.de/docs

Things to know about the structure

Since this repo is a monorepo, the frontend is located in the frontend/-directory. The backend-project (Pipfile) is in the root, but all the code is located in the classquiz/-folder.

Tech-Stack

Backend

The backend is made with FastAPI (web-framework) , ormar (ORM) , python-socketio (realtime-communication between server and client)

Frontend

The frontend is made with SvelteKit (web-framework) and TailwindCSS (Css-Framework).

External Dependencies

Selfhostable:

Closed-Source 3rd parties:


License Note

This repository is licensed under the Mozilla Public License 2.0, so you

MUST PUBLISH ANY CHANGES YOU MAKE!!!1

Footnotes

  1. I added this note, since people are stealing my software and changing it without providing the source-code. Maybe they aren't aware of this license, maybe they don't care, but I don't care, why they don't do it. THEY HAVE TO!

classquiz's People

Contributors

ahmetlii avatar anleg avatar buhaneenhhhh avatar comradekingu avatar deepsource-autofix[bot] avatar dependabot[bot] avatar developer-diganta avatar dynnammo avatar haduytiep avatar hohmiyazawa avatar jjoao avatar jmontane avatar jonathan-d-zhang avatar liimee avatar maupao avatar mawoka-myblock avatar maxmasetti avatar miniontoby avatar naosone avatar nilocram avatar npv12 avatar optimisticsean avatar pre-commit-ci[bot] avatar rezaalmanda avatar ricolaaa avatar sergpryimachuk avatar snyk-bot avatar studio-ogo avatar waldist avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

classquiz's Issues

Fix unit tests

The test-coverage is at 76%, but it can be improved. The coverage is only for the backend (python)-part.

Sentences untranslated on classquiz main view

Which component is affected?

main page

Did the issue occur at ClassQuiz.de, or on a self-hosted instance?

On ClassQuiz.de

How can the issue be reproduced?

  1. Go to main page
  2. See footer untranslated despite choosing another language

Describe the bug (with screenshots if possible)

image

Device

Laptop/Notebook

Operating System

Linux

Browser

Brave

Captcha fails again and again

⚠️ The main ClassQuizz instance at (https://classquiz.mawoka.eu/) uses Sentry as a bug detection software, so please disable your AdBlocker if you want to ease the debug process ⚠️

Describe the bug
When wanting to register for a private game, it throws me away an error of captcha failure

To Reproduce

  1. Create a private quiz
  2. Start it
  3. Try to connect to a game by going on classquiz and click Play
  4. Fill the game pin
  5. fill player name
  6. See error

Expected behavior
It should return me the waiting page, and for the game creator show me that a user entered.

Screenshots
Video for bug description

Stacktrace
If applicable, add the error stacktrace to help explain your problem.

Extra data (please complete the following information):

  • Device [e.g. iPhone6, Desktop]: PC
  • Device OS [e.g. iOS8.1, Windows 10]: MAnjaro KDE
  • Browser [e.g. Chrome, Firefox, Safari]: Version 1.30.87 Chromium: 94.0.4606.71
  • Classquiz Version [e.g. 0.10]: ⚠️** No versioning for now** ⚠️
  • Classquiz installation [e.g. classquiz.mawoka.eu]:
  • Commit SHA [e.g : ed35c5c]:

Additional context
Add any other context about the problem here.

TypeError: u.execute is not a function

Sentry Issue: CLASSQUIZ-2

It's the captcha

TypeError: u.execute is not a function
  at HTMLFormElement.r (/_app/pages/play.svelte-a86958f2.js:1:4103)
  at HTMLFormElement.<anonymous> (/_app/chunks/vendor-ac0f918a.js:1:3833)
  at HTMLFormElement.i (/_app/chunks/vendor-ac0f918a.js:25:4622)

Add redirection when finishing registration

⚠️ The main ClassQuizz instance at (https://classquizz.mawoka.eu/) uses Sentry as a bug detection software, so please disable your AdBlocker if you want to ease the debug process ⚠️

Describe the bug
After the registration process we should redirect to main page or another page, instead of letting user on the registration form.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Register page
  2. Fill registration form
  3. Click on register
  4. Close alert
  5. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Stacktrace
If applicable, add the error stacktrace to help explain your problem.

Extra data (please complete the following information):

  • Device [e.g. iPhone6, Desktop]:
  • Device OS [e.g. iOS8.1, Windows 10]:
  • Browser [e.g. Chrome, Firefox, Safari]:
  • Classquiz Version [e.g. 0.10]: ⚠️** No versioning for now** ⚠️
  • Classquiz installation [e.g. classquiz.mawoka.eu]:
  • Commit SHA [e.g : ed35c5c]:

Additional context
Add any other context about the problem here.

[EPIC] UX/UI main design

Describe the feature
There's two type of users of software like Classquiz : quizz-writers and quizz-makers.

The first types are teachers, people making presentations like commercials etc. . Therefore, I think their main concern is 1) creating quizz 2) editing it (modify questions, deleting them etc.). In short, the interaction with ClassQuiz is often done for these people through laptop/PC, with a wide screen, and pointing mouse interaction. Furthermore, they must go on classquiz quite often, therefore the interface is critical for them

Meanwhile, the second one do not use the app very long, and mainly (if not 100%) through their smartphone, the UI they must access should be adapted so : colors/information about the software aren't important, but access to a launched quiz must be quick, and how the questions are displaying should be adapt to their devices' screen.

It would therefore be great to separate dramatically the way we create and design quizz from the way we answers them. We're already on this path, since the way we create and update question has really improved since few versions 👍 (the "slides" view when editing a quizz as instance).

As instance, the main dashboard view right now, is more adapted for a smartphone. A "cards view" would be more adapted in my opinion, since it allows teachers to quickly navigate between their created quizz. For smartphone users, a "play" button could be immediately accessible through the main screen (right now, we have to click on the hamburger menu and then click play ; to quote a concurrent, Kahoot! decided to create 2 different sites, one for students (kahoot.it), and kahoot.com for quizz-makers with all other informations)

This issue can seems very blurry right now, I'll gladly provide some mockups about how I would do soft redesign in this sense, in order not to change too many things at a time.

Separate frontend and backend repository

Describe the change and why it is needed
Put frontend in different repository to make the codebase clean and clear, also make it easier for new contributor like me to contribute (I am learning frontend dev).

Additional context
None

Thanks for contributing to ClassQuiz!

Wrong password at password creation - error message unclear

⚠️ The main ClassQuizz instance at (https://classquizz.mawoka.eu/) uses Sentry as a bug detection software, so please disable your AdBlocker if you want to ease the debug process ⚠️

Describe the bug
When wanting to create an account, the box are red circled but we don't now exactly why the password is not difficult enough

To Reproduce
Steps to reproduce the behavior:

  1. Go to Register
  2. Fill email
  3. Fill password input with a simple word like 'test'
  4. See error

Expected behavior
It should display a meaningful error message like Your password should be X character long at least and have special characters among !&'"()

Screenshots
image

Stacktrace
If applicable, add the error stacktrace to help explain your problem.

Extra data (please complete the following information):

  • Device [e.g. iPhone6, Desktop]:
  • Device OS [e.g. iOS8.1, Windows 10]:
  • Browser [e.g. Chrome, Firefox, Safari]:
  • Classquiz Version [e.g. 0.10]: ⚠️** No versioning for now** ⚠️
  • Classquiz installation [e.g. classquiz.mawoka.eu]:
  • Commit SHA [e.g : ed35c5c]:

Additional context
Add any other context about the problem here.

Attribution

Describe the bug
Add a small note like:

Thanks to my friends, @adeekshith and @Dynnammo, for their great support.

To the guys:

  1. Do you even want that,
  2. Which link and name do you want there?

Error save quiz when added image

Which component is affected?

frontend

Did the issue occur at ClassQuiz.de, or on a self-hosted instance?

On a self-hosted instance

How can the issue be reproduced?

  • Use local to save images
  • Create a new quiz
  • Upload an image
  • Save the quiz

Describe the bug (with screenshots if possible)

When i add a png image in the quizz, after i have always an error popup when save the quizz !

i don't have an error in the API logs, only a 400 error log

172.19.0.5:40412 - "POST /api/v1/editor/finish?edit_id=e793fede HTTP/1.1" 400

I have create the directory /var/storage and i have set to 777.

The image is present in the folder but the response of the finish is => {"detail":"Image URL(s) aren't valid!"}

Device

Desktop

Operating System

Linux

Browser

All

& encoding error

⚠️ The main ClassQuizz instance at (https://classquizz.mawoka.eu/) uses Sentry as a bug detection software, so please disable your AdBlocker if you want to ease the debug process ⚠️

Describe the bug
ClassQuiz replaces "&" characters in the description with "&amp;".

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Quiz and edit it
  2. Go to description field
  3. Enter your description with an "&" character
  4. Save the quiz
  5. Edit the quiz again and look at the description field OR start the quiz and look at the description

Expected behavior
I expected that the "&" character to remain an "&" character.

Screenshots

ClassQuiz.issue.mp4

Stacktrace
/

Extra data (please complete the following information):

  • Device: Laptop, Samsung Galaxy A50, Apple iPad 7th Gen.
  • Device OS: Windows 10, Android 11, iPadOS 15.5 Public Beta
  • Browser: Chrome, Chrome, Safari & Chrome
  • Classquiz Version [e.g. 0.10]: ⚠️** No versioning for now** ⚠️
  • Classquiz installation [e.g. classquiz.mawoka.eu]:
  • Commit SHA [e.g : ed35c5c]:

Additional context
/

User-Screen

A user should have its own public page which can be shared, so that others can see all the quizzes this user created.

Things the screen should show:

  • Username
  • When the account was created
  • A list of all quizzes
  • Quiz-count (excluding imported quizzes)
  • User-Avatar (#62)

Design - Incorrect display rectangle when connecting

⚠️ The main ClassQuizz instance at (https://classquizz.mawoka.eu/) uses Sentry as a bug detection software, so please disable your AdBlocker if you want to ease the debug process ⚠️

Describe the bug
Wrong text display when connecting

To Reproduce
Steps to reproduce the behavior:

  1. Go to connexion screen
  2. Click on Emai
  3. See error : email rectangle is displaying

Expected behavior
Having same display as password, like password rectangle not appearing

Screenshots
image

Stacktrace
If applicable, add the error stacktrace to help explain your problem.

Extra data (please complete the following information):

  • Device [e.g. iPhone6, Desktop]: Desktop
  • Device OS [e.g. iOS8.1, Windows 10]: Manjaro KDE 21
  • Browser [e.g. Chrome, Firefox, Safari]: Version 1.30.87 Chromium: 94.0.4606.71
  • Classquiz Version [e.g. 0.10]: ⚠️** No versioning for now** ⚠️
  • Classquiz installation [e.g. classquiz.mawoka.eu]:
  • Commit SHA [e.g : ed35c5c]:

Additional context
Add any other context about the problem here.

Move critical variables inside secrets

There's a bunch of variables showed in clear in the code see config.py with Sentry and Imgur vars for instance.

We should move those variables inside env variables , since people installing classquiz should rely on their own credentials

Add minimal CI with Github Actions

Describe the change and why it is needed
An open-source project attract a community when people see that even if it's under heavy development, it is battlefield-tested with a bunch of automatic tools that check linting, tests etc.

We should have a minimal CI. To begin with :

  • python linting (flake8 as instance
  • svelte/js linting
  • test suite for python (pytest already used)

Additional context
I'm acquainted with such work, I could work on it if I'm becoming Triage/Maintain member of this project.

Thanks for contributing to ClassQuiz!

Fix join-screen

  • allow only numbers to be entered in the game-pin field
  • Limit the length of username

API container doesn't start

Which component is affected?

API container

Did the issue occur at ClassQuiz.de, or on a self-hosted instance?

On a self-hosted instance

How can the issue be reproduced?

Fill the docker compose like the documentation.

This is my Env data :

environment:
- DB_URL="postgresql://postgres:classquiz@db:5432/classquiz"
- MAIL_ADDRESS="[email protected]"
- MAIL_PASSWORD="P@ssw0rd"
- MAIL_USERNAME="[email protected]"
- MAIL_SERVER="smtp.xxx.com"
- MAX_WORKERS="1" # Very important
- MAIL_PORT="587"
- SECRET_KEY="MySecret"
- ACCESS_TOKEN_EXPIRE_MINUTES=30
- SKIP_EMAIL_VERIFICATION=true
- HCAPTCHA_KEY="HCAPTCHA_PRIVATE_KEY"
- MEILISEARCH_URL="http://meilisearch:7700"
- VITE_GOOGLE_AUTH_ENABLED=false
- VITE_GITHUB_AUTH_ENABLED=false
- STORAGE_BACKEND="local"
- STORAGE_PATH="/var/storage"
- REDIS=redis://redis:6379/0?decode_responses=true

Describe the bug (with screenshots if possible)

When the API container start, i have this error

Checking for script in /app/prestart.sh
Running script /app/prestart.sh
Traceback (most recent call last):
  File "/usr/local/bin/alembic", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/alembic/config.py", line 590, in main
    CommandLine(prog=prog).main(argv=argv)
  File "/usr/local/lib/python3.10/site-packages/alembic/config.py", line 584, in main
    self.run_cmd(cfg, options)
  File "/usr/local/lib/python3.10/site-packages/alembic/config.py", line 561, in run_cmd
    fn(
  File "/usr/local/lib/python3.10/site-packages/alembic/command.py", line 322, in upgrade
    script.run_env()
  File "/usr/local/lib/python3.10/site-packages/alembic/script/base.py", line 569, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/usr/local/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 94, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/local/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 110, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/app/migrations/env.py", line 6, in <module>
    from classquiz.db.models import metadata
  File "/app/./classquiz/__init__.py", line 11, in <module>
    from classquiz.config import settings
  File "/app/./classquiz/config.py", line 61, in <module>
    redis: redis_base_lib.client.Redis = redis_lib.Redis().from_url(settings().redis)
  File "/app/./classquiz/config.py", line 58, in settings
    return Settings()
  File "pydantic/env_settings.py", line 38, in pydantic.env_settings.BaseSettings.__init__
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Settings
�
t
  value is not a valid integer (type=type_error.integer)

I'm not a Python dev and i don't understand why setting are not valid !

Device

Desktop

Operating System

Debian Linux Docker

Browser

All

User-Avatars

  • Show User-Avatars in quiz-page
  • Regenerate avatar

Create a quizz without need to create an account

Describe the feature
As Classquizz is a project in early development, it would be greqt to eqse the process of quiz creation by letting people create quiz without the need to register.

The process could look followingly :

  1. Main page having a button "Create a quiz now!"
  2. Redirecting to the creation of a quizz
  3. Quizz creation workflow
  4. Quizz play workflow
  5. At the end of the game, having a message suggesting to create an account to save the quizz permanently

Screenshots
If applicable, add screenshots to help explain your feature.

Additional context
Add any other context about the problem here.

Thanks for contributing to ClassQuiz!

Sign Out button in navbar

Describe the bug
It would be great to have a disconnect button, similarly to Login, on the top right of the header.

Screenshots
image

Additional context
Add any other context about the problem here.

Thanks for contributing to ClassQuiz!

Cover-Image

Show an image next to the description, etc

Add an issue template concerning repo architecture

Describe the bug
As the project is young, many changes will come concerning implementation of a CI/CD pipeline, refactoring of some parts of code etc.
It would be great to have an issue template specialized in it, as those improvements aren't new features nor bugs, rather improvements of the source code.

Screenshots
If applicable, add screenshots to help explain your feature.

Additional context
Add any other context about the problem here.

Thanks for contributing to ClassQuiz!

Classquiz versioning

Describe the feature
It would be great to start versioning important versions of Classquiz.
Many advantages :

  • stable versions to ease deployment
  • scoping bugfix vs. breaking improvements
  • ease debuging process, right now all bugs are on the latest commit, but it'll help reproducing bugs detected in Github issues
  • looks more appealing for newbies joining the project to see this as proof of steady management system

We could follow a simple versioning system like this one to begin with : https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_simple_versioning , with a 0.1.0

Additional context
Add any other context about the problem here.

Thanks for contributing to ClassQuiz!

Test-coverage

Describe the change and why it is needed
Test-coverage

Additional context
I don't have to explain why tests are important. I want to have at least a backend-testing. The following parts are already tested:

  • classquiz/kahoot_importer
  • classquiz/storage

Redo the "overview"-page

A user mentioned that the overviwe-screen isn't very user-friendly and that's true. I honestly don't even know when I touched it the last time after creating it in like 10 mins, so it's time to redo it. Of you got any ideas on how it could look, please tell me!
@Dynnammo

Make /search and /explore mobile-friendly

⚠️ The main ClassQuizz instance at (https://classquizz.mawoka.eu/) uses Sentry as a bug detection software, so please disable your AdBlocker if you want to ease the debug process ⚠️

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Doesn't matter

Expected behavior
Show only one card per row, not 3

Screenshots
Screenshot_20220415-233404

Stacktrace
If applicable, add the error stacktrace to help explain your problem.

Extra data (please complete the following information):

  • Device [e.g. iPhone6, Desktop]:
  • Device OS [e.g. iOS8.1, Windows 10]:
  • Browser [e.g. Chrome, Firefox, Safari]:
  • Classquiz Version [e.g. 0.10]: ⚠️** No versioning for now** ⚠️
  • Classquiz installation [e.g. classquiz.mawoka.eu]:
  • Commit SHA [e.g : ed35c5c]:

Additional context
Add any other context about the problem here.

Reload-Loop

The login-page reloads forever without a reason. The problem is that the /rememberme-route replies successfully, but the /users/check-route replies with a 401. I just don't get it, but I'll have an eye on it. Solution for now: Delete all website-data (all cookies)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.