How luclvan/onlinecourse works
This is a PHP online-course application: users browse courses, view details, and (as students) enroll; instructors manage courses and lessons, while administrators manage users and categories and view statistics. The front controller dispatches requests to role-specific controllers, which render PHP views and invoke domain models. The tree also documents materials and student dashboards/progress, but their controller wiring is not present in the sampled source, so those links are omitted. Database interactions are directly evidenced for enrollment and admin statistics; other model persistence paths are not sampled.
Main entry points: index.php Action router · CourseController.php Course controller · LessonController.php Lesson controller · AuthController.php Authentication controller
Components 25
Request handling
- Action router
index.php
Coursework
- Course controller
controllers/CourseController.php - Enrollment controller
controllers/EnrollmentController.php - Lesson controller
controllers/LessonController.php - Course model
models/Course.php - Lesson model
models/Lesson.php - Material model
models/Material.php - Course catalog views
views/courses/index.php - Course detail view
views/courses/detail.php - Instructor workspace
views/instructor/my_courses.php - Lesson management views
views/instructor/lessons/manage.php - Material upload view
views/instructor/materials/upload.php - Student learning views
views/student/course_progress.php
Accounts and admin
- Authentication controller
controllers/AuthController.php - User model
models/User.php - Category model
models/Category.php - Sign-in views
views/auth/login.php - Administration views
views/admin/dashboard.php - Statistics controller
controllers/AdminController.php
Persistence
- Enrollment model
models/Enrollment.php - Database connector
config/Database.php - MySQL database
Other components
- Learner
- Instructor
- Administrator
Connections 22
- Learner → Action router: requests pages
- Instructor → Action router: requests management
- Administrator → Action router: requests administration
- Action router → Authentication controller: dispatches auth
- Action router → Course controller: dispatches courses
- Action router → Enrollment controller: dispatches enrollment
- Action router → Lesson controller: dispatches lessons
- Action router → Statistics controller: dispatches statistics
- Course controller → Course model: calls
- Course controller → Category model: loads categories
- Course controller → Course catalog views: renders
- Course controller → Course detail view: renders
- Course controller → Instructor workspace: renders
- Lesson controller → Course model: checks ownership
- Lesson controller → Lesson model: calls
- Lesson controller → Lesson management views: renders
- Enrollment controller → Enrollment model: checks and enrolls
- Authentication controller → User model: authenticates and manages
- Authentication controller → Sign-in views: renders
- Statistics controller → Database connector: queries statistics
- Enrollment model → Database connector: connects through
- Database connector → MySQL database: opens connection