លំហសិក្សាកម្ពុជា
V1.0
StudySprout is a web-based Gamified Learning Management System developed using Flask, OOP, SQLAlchemy ORM, and SQLite/MySQL. It supports course management, lesson tracking, and role-based access for users such as Students, Professors, and Administrators. To improve student engagement, the system includes daily streaks, reward points, and course completion bonuses. Evaluation showed consistent data management, responsive navigation, request times under 100ms, and high user satisfaction.
Final Report: ‘Study Sprout’ Learning Management System
Using Object-Oriented Programming and Flask 3.0.3
for
Course: Object-Oriented Programming II
Class: CSM1
Authors
Bun Sahanou (ID: ST-00057), Thy Lyyong (ID: ST-00017), Ty Reaksa (ID: ST-000118),
Vichet Thody (ID: ST-RE00064)
Lecturer
Sek Socheat
Academic Year
2026 - 2027
Abstract
Traditional e-learning management systems frequently suffer from low student engagement, lack of continuous progress tracking, and cumbersome administrative overhead. This report details the design, implementation, and evaluation of StudySprout, a web-based Gamified Learning Management System developed using the Flask framework, Object-Oriented Programming (OOP) principles, SQLAlchemy ORM, and relational database management systems (SQLite/MySQL). Edu Platform integrates core educational management functionality—such as course publishing, lesson tracking, and role-based administration—with gamification mechanisms including daily active streaks, point reward audits, and course graduation bonuses. The platform implements Role-Based Access Control (RBAC) across three primary user roles: Student, Professor, and Administrator. System evaluations demonstrate robust data consistency, responsive navigation, sub-100ms request performance, and high user satisfaction.
Keywords: Learning Management System, Flask, Gamification, Object-Oriented Programming, SQLAlchemy, Relational Database, Role-Based Access Control.
Introduction
Background of Study
The digital transformation of educational institutions has made e-learning platforms central to modern pedagogical delivery. However, first-generation learning management solutions primarily treat web portals as static document repositories, leaving students to consume content passively without immediate feedback loops. Empirical observations show that without interactive mechanics or visible milestone progress, student course completion rates drop dramatically over extended academic terms.
StudySprout was conceived to address these limitations by integrating behavioral gamification directly into the application architecture. By framing learning progress around actionable daily goals, point feedback, and peer achievement, the system transforms standard coursework into an active learning experience.
1.1. Problem Statement
In traditional educational environments and standard learning management setups, student engagement and administrative tracking present significant operational challenges. Instructors and platform administrators frequently grapple with:
Passive Student Engagement: Lack of continuous tracking mechanisms (such as learning streaks or dynamic reward points) leads to low course completion rates.
Manual Administrative Overhead: Difficulty in tracking system-wide user activity, user roles, and operational changes without proper audit logging.
Inflexible Database Integrations: Systems tied strictly to a single database environment often fail to provide seamless zero-configuration development alongside scalable production deployments.
1.2. Objectives and Success Criteria
Table 1.2 Objectives and Evaluation Criteria
1.3. Scope
1.4. Significance
StudySprout enhances learning outcomes by rewarding consistent daily activity and milestone achievements. For educators, it streamlines course construction and publishing. For platform administrators, it ensures operational accountability through structured audit logs and governance tools.
II. Literature Review and Development Background
2.1. Analysis of Relation System
Table 2.1 Comparison of Existing Systems and Proposed System
2.2 Concepts and Technologies
This section must define the main concepts and technologies used in the project, such as Programming, Object-Oriented Programming, Python 3, PyQt6, SQLite3, relational database UI/UX design and software testing.
Table 2.2 Definitions of Main Concepts and Technologies
III. System Analysis Design
3.1 User Stories & Stakeholder Matrix
Table 3.1 Stakeholder Roles and Functional Requirements
3.2. SDLC Model
Figure 3.2 Agile Inspired SDLC Workflow
3.3. System Architecture Design
The application employs a 4-Tier Layered Architecture:
Presentation Layer: HTML5, Modern Glassmorphism CSS, dynamic Jinja2 templates.
Controller Layer: Flask Blueprints (main, auth, student, professor, admin).
Service Layer: Independent business logic engines (Streak Engine, Points Audit Service, Progress Calculation Service, Seed Service).
Data Access Layer: SQLAlchemy ORM mapping Python structures to relational SQLite/MySQL database tables.
Figure 3.3 Study Sprout Learning Management System Architecture Design
3.4 OOP Design and Class Structure
The underlying database comprises seven interconnected tables:
users: Stores user attributes, hashed passwords, assigned role, accumulated points, active streak, and last active date.
courses: Stores course metadata, title, description, instructor foreign key, and publication state.
lessons: Stores individual lesson modules tied to a course, topic content, ordering index, and point rewards.
enrollments: Links users to courses with enrollment status (pending, in_progress, completed).
lesson_progress: Tracks completion states per student per lesson.
points_log: Audit log recording every point transaction, timestamp, student ID, and reason.
audit_logs: System operational log tracking administrative actions, user role modifications, resource deletions, and client IP addresses.
3.5 Database Design Using SQLite3 or RDBMS
Table 3.5 Database Design Distribution
Figure 3.4 Entity Relationship Diagram (ERD)
4.1. Package & Project Directory Structure
The application repository is organized into distinct logical modules:
app/
├── __pycache__/
├── assets/
├── content/lessons/
├── routes/
│ ├── __pycache__/
│ ├── admin.py
│ ├── auth.py
│ ├── main.py
│ ├── professor.py
│ └── student.py
├── services/
│ ├── __pycache__/
│ ├── audit_service.py
│ ├── boss_service.py
│ ├── focus_service.py
│ ├── pet_service.py
│ ├── points_service.py
│ ├── progress_service.py
│ ├── seed_content.py
│ ├── seed_service.py
│ └── streak_service.py
├── static/
├── templates/
├── __init__.py
├── decorators.py
└── models.py
database/
docs/
4.2. Key System Modules & Services
Application Factory: Initializes web extensions, registers routing blueprints, sets up background scheduling tasks, and manages database connection checks.
Streak Tracking Engine: Computes continuous student learning activity. When a student completes a lesson within 24 hours of their last activity, their streak counter increases; if a daily window is missed, a scheduled background job automatically resets the streak to zero.
Points Audit Service: Guarantees that every point addition (from reading topics or achieving milestones) is saved as an immutable audit record in the database.
Progress Calculation Service: Evaluates overall course completion percentages, updates enrollment states, and awards graduation milestone bonuses once all lessons in a track are finished.
Role Governance & Access Protection: Enforces access permissions across student, professor, and administrator views, preventing unauthorized access.
V. Testing and Result
5.1 Test Scenario
The section showcases Test ID indicating the user role being tested, followed by numerical value identifying the sequence of the test case:
TS refers to Student user
TP refers to Professor user
TA refers to Administrator user
Table 5.1 System Functionality Test and Results
5.2 Demo Results
Figure 5.2.1 Sign In Dashboard
Figure 5.2.2 User Student’s Dashboard
[1] Academy: main student dashboard providing access to the platform learning features.
[2] Quest Board: consist of functions where students can select a learning campaign, complete lessons, earn XP and unlock Boss Raid Battles.
[3] Champions: display all student’s level, active streaks, longest streaks, total XP and live leaderboard rankings.
[4] Character Sheet: provide overview of student’s profile with daily engagement, learning progress, active quests and enrolled courses.
[5] Boss Arena: allows students to challenge course-based boss fights, earn XP and test their knowledge.
[6] Focus Shrine: a pomodoro-based timer to track study sessions with customized break time durations.
Figure 5.2.3 User Professor’s Dashboard
[1] Create New Course: enable professors to create new courses, define their curriculum and lessons.
[2] Manage Lessons: allows professors to add, delete and update within their course accordingly.
Table 5.2.4 User Admin’s Dashboard
[1] RBAC Permissions: allows administrators to create roles and configure permission across all platform operations.
[2] Manage Users: provide an overview of users, their assigned role and permissions and allows admin to create and appoint roles for users.
[3] Manage Courses: provide an overview of courses, lead instructor, lessons and status while allowing administrator to inspect, edit and delete courses.
[4] Audit Logs: showcase complete record of administrators and professors operations with timestamps and user details, with filtering options for specific roles.
5.3 Performance/Security Notes
Performance Evaluation
Performance benchmark tests were conducted to evaluate rendering speed, component loading and dynamic UI updates with metrics using Safari Web Inspector (Timeline Profiler).
Table 5.3 System Performance Evaluation and Execution Benchmarks
Security Measures
Authentication & Password Hashing: user passwords are securely salted and hashed using Bcrypt/Werkzeug before database storage. Plain-texted passwords are never stored or logged.
Role-Based Access Control (RBAC): Backend middleware verifies user roles for every request and blocks unauthorized access with a ‘403 Forbidden’ response.
SQL Injection & XSS Prevention: Parameterized ORM queries protect against SQL injection while user inputs are sanitized before rendering to reduce Cross-Site Scripting (XSS) risks.
Gamification Logic & XP Protection: Experience Point (XP) calculations, quest completions and badge rewards are validated on the Flask backend, preventing client-side manipulation of points.
Conclusion and Future Development
6.1. Summary of Contributions
The StudySprout project successfully demonstrates a functional, gamified learning management system. Key achievements include:
Successful application of Object-Oriented Programming and modular architecture patterns.
Implementation of continuous motivation mechanics including streak tracking, audited points distribution, and graduation bonuses.
Delivery of Role-Based Access Control and administrative audit logging for system governance.
Flexible dual-database connectivity supporting both local zero-configuration development and production-grade database setups.
6.2. Limitation and Lessons learned
Prototype Scope: The application currently functions as a web-based platform; offline client-side caching and mobile application wrappers are not included in this phase.
Real-time Push Notifications: Leaderboards currently update upon page interaction rather than utilizing live WebSocket updates.
6.3. Future Development
Table 6.3 Future Development Plans
Flask Application 3.0.3
Lecturer’s Notes
មតិយោបល់ 0