The QuizWiz is a Flask-based web application that allows users to create, take, and manage quizzes. It's designed to facilitate remote learning scenarios where teachers can create quizzes, and students can take them online.
- User Registration: Users can register with different roles (student or teacher).
- User Login: Registered users can log in and obtain access tokens for authentication.
- Quiz Creation: Teachers can create quizzes with various question types, including multiple-choice and true/false.
- Quiz Taking: Students can take quizzes with automatic scoring.
- User Roles: Differentiate between students and teachers with role-based access control.
- Data Security: Passwords are hashed for security, and access tokens are used for authentication.
- Error Handling: Proper error messages and status codes are returned for API requests.
-
Clone this repository to your local machine:
git clone https://github.com/yourusername/QuizWiz.git
-
Navigate to the project directory:
cd QuizWiz
-
Install the required dependencies (Flask, Flask-JWT-Extended, Flask-SQLAlchemy):
pip install Flask Flask-JWT-Extended Flask-SQLAlchemy
-
Run the application:
python app.py
The application will start, and you can access it at http://localhost:5000/.
POST /register
: Register a new user.POST /login
: Log in and obtain an access token.POST /quiz/create
: Create a new quiz (requires teacher role and authentication).
You can test the API endpoints using tools like Postman or by writing unit tests using testing frameworks like unittest
, pytest
, or nose
. Refer to the documentation for detailed instructions on testing each endpoint.
If you'd like to contribute to this project, please fork the repository, make your changes, and submit a pull request.