Learning-Management-System- 📚 Django LMS (Learning Management System)
A simple Learning Management System (LMS) built with Django, where teachers can create courses, add chapters & lessons, and assign quizzes. Students can enroll in courses, view lessons, and take assignments with automatic scoring.
🚀 Features 👨🏫 Teacher
Sign up & login as Teacher
Create, update, delete Courses
Add Chapters under courses
Add Lessons (with content & video links)
Manage Quiz Questions (MCQs with multiple options)
Approve/Reject student course enrollment requests
View teacher dashboard with courses & pending requests
👩🎓 Student
Sign up & login as Student
Enroll in available courses
Access approved courses
View lessons & content
Attempt Assignments/Quizzes
Get automatic Score Card
🔑 Authentication
Role-based login (Teacher / Student)
Session-based authentication
Logout functionality
🛠️ Tech Stack
Backend: Django (Python)
Frontend: Django Templates (HTML, CSS, Bootstrap)
Database: SQLite (default, can switch to PostgreSQL/MySQL)
Authentication: Django’s built-in auth system
📂 Project Structure lms_project/ │── courses/ │ ├── models.py # Profile, Course, Chapter, Lesson, Question, Option, Enrollment │ ├── views.py # All views (auth, dashboards, CRUD, quizzes) │ ├── templates/ # HTML templates (signup, login, dashboard, lessons, quiz, etc.) │ ├── urls.py # App-level routing │── lms_project/ │ ├── settings.py # Django settings │ ├── urls.py # Project-level routing │── manage.py # Django CLI
⚙️ Setup & Installation
Clone the Repository https://github.com/Dev-Rahul07/Learning-Management-System-.git git clone cd django-lms
Create Virtual Environment
python -m venv venv source venv/bin/activate # for Linux/Mac venv\Scripts\activate # for Windows
Install Dependencies
pip install -r requirements.txt
Run Migrations
python manage.py makemigrations python manage.py migrate
Create Superuser (Optional)
python manage.py createsuperuser
Run Development Server
python manage.py runserver
Open in browser:
📖 Usage Flow 🔐 Authentication
Go to /signup/ → Register as Teacher or Student
Login from /login/
👨🏫 Teacher Flow
Login as Teacher
Create Courses → Add Chapters → Add Lessons
Add Quiz Questions for lessons
Approve student requests
Manage your content via Teacher Dashboard
👩🎓 Student Flow
Login as Student
Browse available courses & request enrollment
Access approved courses
View lessons & take assignments
Check your Score Card
📌 Endpoints (Main Views) Endpoint Description /signup/ User registration (teacher/student) /login/ User login /logout/ User logout /teacher_dashboard/ Teacher’s dashboard /student_dashboard/ Student’s dashboard /create_course/ Create a new course /add_chapter/<course_id>/ Add chapter to course /view_chapters/<course_id>/ View course chapters /add_lesson/<chapter_id>/ Add lesson /view_lessons/<chapter_id>/ View lessons /add_question/<lesson_id>/ Add quiz questions /assignment/<lesson_id>/ Take assignment (quiz) /approve_request/<enrollment_id>/ Approve student request 📝 To-Do (Future Improvements)
Add Profile Picture Upload for students/teachers
Add Progress Tracking (lesson completion %)
Add Leaderboards & Certificates
REST API using Django REST Framework
Add Payment Integration for paid courses
🤝 Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.
📜 License
This project is licensed under the MIT License.