Skip to content

This project is a comprehensive Learning Management System (LMS) designed to enhance personalized education and improve academic outcomes within a university setting. It features an advanced AI Recommendation Engine and robust Analytics and Fraud Detection capabilities.

Notifications You must be signed in to change notification settings

Josephat-S/aiprs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Intelligent Student Learning Analytics & Recommendation Platform

A comprehensive learning management system with AI-driven recommendations, analytics, and fraud detection for university education.

🎯 Features

For Students

  • Course Management: Browse and enroll in courses with modules and lessons
  • Learning Progress Tracking: Monitor completion and performance
  • Assignments & Quizzes: Submit assignments and take timed quizzes
  • AI Recommendations: Personalized learning suggestions based on performance
  • Discussion Forums: Engage with peers and instructors
  • Real-time Notifications: Get updates on deadlines, grades, and recommendations
  • Multi-language Support: English, French, and Kinyarwanda
  • Dark/Light Mode: Customizable theme preferences

For Teachers

  • Course Creation: Build courses with modules, lessons, and assessments
  • Performance Analytics: View detailed student performance metrics
  • Assignment Grading: Grade submissions with feedback
  • Forum Moderation: Respond to student questions
  • Participation Tracking: Monitor student engagement
  • Lesson Difficulty Analysis: Identify challenging content

For Admins

  • User Management: Manage students, teachers, and admins
  • Platform Analytics: Monitor system-wide metrics
  • Report Generation: Export CSV/PDF reports
  • Bulk Operations: Import/export courses and enrollments
  • System Health Monitoring: Track platform performance

πŸ—οΈ Architecture

Frontend (React.js + Material UI)

frontend/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/       # Reusable UI components
β”‚   β”œβ”€β”€ pages/           # Page components (student, teacher, admin)
β”‚   β”œβ”€β”€ context/         # React Context (Auth, Theme, Language)
β”‚   β”œβ”€β”€ hooks/           # Custom React hooks
β”‚   β”œβ”€β”€ utils/           # Utility functions and translations
β”‚   └── assets/          # Images and static files
β”œβ”€β”€ public/
└── package.json

Backend (Pure PHP + MySQLi)

backend/
β”œβ”€β”€ api/                 # REST API endpoints
β”œβ”€β”€ config/              # Database and constants
β”œβ”€β”€ models/              # Data models (CRUD operations)
β”œβ”€β”€ controllers/         # Business logic
β”œβ”€β”€ includes/            # Shared templates
β”œβ”€β”€ uploads/             # User-uploaded files
β”œβ”€β”€ reports/             # Generated reports
└── logs/               # Error and analytics logs

Database (MySQL)

  • 3NF Normalized Schema
  • 14 Tables: users, courses, modules, lessons, enrollments, assignments, submissions, quizzes, questions, quiz_attempts, forum_posts, recommendations, notifications, analytics_logs
  • Prepared Statements: SQL injection prevention
  • Foreign Keys: Data integrity enforcement

πŸš€ Installation

Prerequisites

  • PHP: 7.4 or higher
  • MySQL: 5.7 or higher
  • Node.js: 16.x or higher
  • XAMPP/WAMP/LAMP: Local server environment

Backend Setup

  1. Import Database
# Start MySQL server
mysql -u root -p

# Create database
CREATE DATABASE student_learning_platform;

# Import schema
mysql -u root -p student_learning_platform < database/schema.sql

# Import seed data
mysql -u root -p student_learning_platform < database/seed_data.sql
  1. Configure Database Connection Edit backend/config/database.php:
private $host = 'localhost';
private $username = 'root';
private $password = '';
private $database = 'student_learning_platform';
  1. Set Directory Permissions
chmod -R 755 backend/uploads
chmod -R 755 backend/reports
chmod -R 755 backend/logs
  1. Configure Apache Ensure mod_rewrite is enabled and .htaccess files are processed.

Frontend Setup

  1. Install Dependencies
cd frontend
npm install
  1. Configure API Endpoint Edit frontend/src/context/AuthContext.js:
const API_BASE_URL = 'http://localhost/aiprs/backend/api';
  1. Start Development Server
npm start

The application will open at http://localhost:3000

Production Build

cd frontend
npm run build

πŸ” Security Features

  1. Authentication

    • Secure password hashing (bcrypt)
    • Session management
    • Role-based access control (RBAC)
  2. Input Validation

    • Client-side: React form validation
    • Server-side: PHP filter_var, htmlspecialchars
    • Prepared statements for SQL
  3. File Upload Security

    • MIME type validation
    • File size limits (10MB)
    • Random filename generation
    • Restricted upload directories
  4. Activity Logging

    • Login attempts
    • Data modifications
    • Recommendation generation
    • Quiz attempts with fraud detection
  5. CORS Configuration

    • Controlled cross-origin requests
    • API endpoint protection

πŸ“Š AI Recommendation Engine

Algorithm Types

  1. Next Lesson: Suggests the next logical lesson based on progress
  2. Review: Recommends revisiting content for struggling students (score < 60%)
  3. Challenge: Advanced content for high performers (score β‰₯ 85%)
  4. Remedial: Content review based on quiz performance

How It Works

1. Analyze student performance data
   - Quiz scores
   - Assignment grades
   - Lesson completion rates
   - Time spent on lessons

2. Apply rule-based logic
   - High performers β†’ Challenging content
   - Struggling students β†’ Review and remedial
   - Average students β†’ Next lessons

3. Generate personalized recommendations
   - Priority scoring (0-10)
   - Reason explanation
   - Course/lesson linking

4. Send notifications
   - Real-time alerts
   - Dashboard display

πŸ§ͺ Demo Accounts

Role Email Password
Student sangwabgy Admin@123!
Student jackson Admin@123!
Teacher Teacher1 Admin@123!
Admin admin Admin@123!

πŸ“± API Endpoints

Authentication

  • POST /api/auth.php?action=login - User login
  • POST /api/auth.php?action=register - User registration
  • POST /api/auth.php?action=logout - User logout
  • GET /api/auth.php?action=current - Get current user

Courses

  • GET /api/courses.php?action=list - List all courses
  • GET /api/courses.php?action=get&id={id} - Get course details
  • POST /api/courses.php?action=create - Create course
  • PUT /api/courses.php?action=update&id={id} - Update course
  • DELETE /api/courses.php?action=delete&id={id} - Delete course

Enrollments

  • GET /api/enrollments.php?action=student_courses - Get student's courses
  • GET /api/enrollments.php?action=course_students - Get course students
  • POST /api/enrollments.php?action=enroll - Enroll in course
  • PUT /api/enrollments.php?action=update_progress - Update progress

Recommendations

  • GET /api/recommendations.php?action=get - Get recommendations
  • POST /api/recommendations.php?action=generate - Generate new recommendations
  • POST /api/recommendations.php?action=mark_viewed - Mark as viewed

🌐 Multi-Language Support

Supported languages:

  • English (en): Default
  • French (fr): Full translation
  • Kinyarwanda (rw): Full translation

Add translations in frontend/src/utils/translations.js

🎨 Theming

Toggle between light and dark modes using the half-moon icon in the top navigation bar. Theme preference is saved in localStorage.

πŸ“ˆ Analytics & Reports

Student Analytics

  • Enrollment statistics
  • Completion rates
  • Average grades
  • Study time tracking

Teacher Analytics

  • Course performance metrics
  • Student participation rates
  • Assignment submission statistics
  • Quiz score distributions

Admin Analytics

  • Platform-wide metrics
  • User growth trends
  • Course popularity
  • System performance

Report Generation

  • CSV exports for data analysis
  • PDF reports for presentations
  • Filter by date, course, student, or grade

πŸ” Fraud Detection

Quiz Monitoring

  • IP address tracking
  • Time analysis (too fast/slow)
  • Answer pattern detection
  • Multiple tab detection (future enhancement)

Assignment Plagiarism

  • Text similarity checking
  • Submission timing analysis
  • Pattern recognition

πŸ› οΈ Development

Code Standards

  • PHP: PSR-12 coding standards
  • JavaScript: ESLint with Airbnb config
  • Comments: Clear documentation for all functions
  • Naming: Descriptive variable and function names

Testing

  • Unit tests for models
  • Integration tests for API endpoints
  • End-to-end tests with Selenium (future)

Version Control

git init
git add .
git commit -m "Initial commit: Intelligent Learning Platform"

πŸ“¦ Dependencies

Frontend

  • React 18.2.0
  • Material UI 5.14.19
  • React Router DOM 6.20.1
  • Recharts 2.10.3
  • Axios 1.6.2

Backend

  • Pure PHP (no frameworks)
  • MySQLi extension
  • GD Library (image processing)

πŸ› Troubleshooting

Common Issues

  1. Database Connection Error

    • Check MySQL is running
    • Verify credentials in backend/config/database.php
    • Ensure database exists
  2. CORS Errors

    • Check API endpoint URL in AuthContext
    • Verify CORS headers in API files
    • Enable mod_headers in Apache
  3. File Upload Fails

    • Check directory permissions (755)
    • Verify upload_max_filesize in php.ini
    • Ensure uploads folder exists
  4. Session Not Persisting

    • Check session.cookie_samesite in php.ini
    • Verify withCredentials: true in Axios requests
    • Ensure cookies are enabled in browser

πŸ“„ License

This project is licensed under the MIT License. See LICENSE file for details.

πŸ‘₯ Support

For questions and support:

🚧 Roadmap

Phase 1 (Current)

  • βœ… Core functionality
  • βœ… AI recommendations
  • βœ… Multi-language support
  • βœ… Analytics dashboard

Phase 2 (Upcoming)

  • πŸ”„ Real-time chat
  • πŸ”„ Video conferencing integration
  • πŸ”„ Mobile app (React Native)
  • πŸ”„ Advanced fraud detection

Phase 3 (Future)

  • πŸ“‹ Machine learning models
  • πŸ“‹ Blockchain certificates
  • πŸ“‹ Gamification features
  • πŸ“‹ Advanced analytics with AI

πŸ™ Acknowledgments

Built with modern web technologies and best practices for educational institutions worldwide.


Version: 1.0.0
Last Updated: November 2024
Maintained by: Development Team

About

This project is a comprehensive Learning Management System (LMS) designed to enhance personalized education and improve academic outcomes within a university setting. It features an advanced AI Recommendation Engine and robust Analytics and Fraud Detection capabilities.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages