A Django-based platform for creating, managing, and delivering computer-based tests with exam access, automated grading, feedback system and secure test delivery.
https://github.com/nexapytech/django-cbt-platform.git
Create Exam
Dashboard
Results Page
python
import spacy
nlp = spacy.load("en_core_web_md")
correct_answer = nlp("The capital of France is Paris.")
student_answer = nlp("Paris is the capital of France.")
similarity_score = student_answer.similarity(correct_answer)
print(f"Similarity Score: {similarity_score:.2f}")
if similarity_score > 0.85:
grade = "Correct"
else:
grade = "Needs review"
print("Grade:", grade)
`
### โ๏ธ Make Commands
To make your repo **easy to run and test**, we provide a Makefile:
### Run the API locally
`bash
make run
### Run all tests
make test
### make up
make up
### Stop docker Container
make down
### apply Django Migrations
make migrate
### make admin user
make createsuperuser
### Run code linting & formatting checks
make lint
`
---
### Optional MySQL
Uncomment the following variables in your .env file if you want to use MySQL:
`env
DB_NAME='cbt_db'
DB_USER='cbt_user'
DB_PASSWORD='cbt_pass'
DB_HOST='localhost'
DB_PORT=3306
`
### Start containers
` bash
docker-compose up
### Apply migrations (if not using auto-run)
docker-compose run web python manage.py migrate
### Create a superuser
docker-compose run web python manage.py createsuperuser
### Stop containers
docker-compose down
`
### Static Files (Production)
Static files are generated using:
python manage.py collectstatic
---
### โ๏ธ Local Setup (Linux / Windows)
### 1. Clone the repo
` bash
git clone https://github.com/nexapytech/django-cbt-platform.git.
cd django-cbt-platform
`
### Docker Setup (Recommended)
`bash
docker build -t nexapycbt .
docker run -p 8000:8000 nexapycbt
``