Code Monkey home page Code Monkey logo

basemax / educationalmvcplatformphp Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 134 KB

This is an educational platform where users can access and consume educational content such as videos, lectures, and quizzes. The platform also includes features for user authentication, progress tracking, and quiz grading.

License: GNU General Public License v3.0

PHP 100.00%
education-platform mvc php php-cms php-education php-mvc php8 php-educational

educationalmvcplatformphp's Introduction

Educational Platform MVC PHP

This is an educational platform where users can access and consume educational content such as videos, lectures, and quizzes. The platform also includes features for user authentication, progress tracking, and quiz grading.

Features

  • User authentication
  • Upload and manage educational content such as videos, lectures, and quizzes
  • Progress tracking for users to keep track of their progress through educational content
  • Quiz grading to evaluate user knowledge and understanding

API Routes

Authentication

  • POST /api/register: Register a new user
  curl --location 'http://localhost:5000/api/register' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'name=fakename' \
  --data-urlencode '[email protected]' \
  --data-urlencode 'password=fakepass'

Response:

{
    "token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.WyJBbGlBaG1hZGkiLCJBbGlBaG1hZGlAZ21haWwuY29tIiwiJDJ5JDEwJFV2RE9pM3dVMFVJdE1jOWVkS09nWHVWVWdOdEFEWmw0MmdtZ0RIQzI5VVVWbkgzUHhhQkVTIl0.pJrm81UK1aysfLWM2tyzeWDTugsdoBqBZj3vsj9z1OA"
}
  • POST /api/login: Login a user
  curl --location 'http://localhost:5000/api/login' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'name=fakename' \
  --data-urlencode '[email protected]' \
  --data-urlencode 'password=fakepass'

Response:

{
    "token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.WyJBbGlBaG1hZGkiLCJBbGlBaG1hZGlAZ21haWwuY29tIiwiJDJ5JDEwJFV2RE9pM3dVMFVJdE1jOWVkS09nWHVWVWdOdEFEWmw0MmdtZ0RIQzI5VVVWbkgzUHhhQkVTIl0.pJrm81UK1aysfLWM2tyzeWDTugsdoBqBZj3vsj9z1OA"
}

Content

  • GET /api/content: Get a list of all content
  • GET /api/content/{id}: Get specific content by ID
  • POST /api/content: Upload new content
  • PUT /api/content/{id}: Update existing content
  • DELETE /api/content/{id}: Delete existing content

Progress

  • GET /api/progress: Get a list of all progress for a user
  • POST /api/progress: Update progress for a user

Quizzes

  • GET /api/quizzes: Get a list of all quizzes
  • GET /api/quizzes/{id}: Get specific quiz by ID
  • POST /api/quizzes: Create a new quiz
  • PUT /api/quizzes/{id}: Update an existing quiz
  • DELETE /api/quizzes/{id}: Delete an existing quiz

Questions

  • GET /api/quizzes/{quiz_id}/questions: Get a list of all questions for a specific quiz
  • GET /api/quizzes/{quiz_id}/questions/{id}: Get a specific question by ID for a specific quiz
  • POST /api/quizzes/{quiz_id}/questions: Create a new question for a specific quiz
  • PUT /api/quizzes/{quiz_id}/questions/{id}: Update an existing question for a specific quiz
  • DELETE /api/quizzes/{quiz_id}/questions/{id}: Delete an existing question for a specific quiz

Answers

  • GET /api/questions/{question_id}/answers: Get a list of all answers for a specific question
  • GET /api/questions/{question_id}/answers/{id}: Get a specific answer by ID for a specific question
  • POST /api/questions/{question_id}/answers: Create a new answer for a specific question
  • PUT /api/questions/{question_id}/answers/{id}: Update an existing answer for a specific question
  • DELETE /api/questions/{question_id}/answers/{id}: Delete an existing answer for a specific question

Note: This is just an example list of API routes, and you may need to modify it based on the specific requirements.

Database Schema

Users

  • id: int (primary key)
  • name: varchar(255)
  • email: varchar(255)
  • password: varchar(255)
  • created_at: timestamp
  • updated_at: timestamp

Content

  • id: int (primary key)
  • title: varchar(255)
  • description: text
  • type: enum('video', 'lecture', 'quiz')
  • content_file: varchar(255) (path to file)
  • created_at: timestamp
  • updated_at: timestamp

Progress

  • id: int (primary key)
  • user_id: int (foreign key to Users table)
  • content_id: int (foreign key to Content table)
  • completed: boolean
  • created_at: timestamp
  • updated_at: timestamp

Quizzes

  • id: int (primary key)
  • content_id: int (foreign key to Content table)
  • title: varchar(255)
  • created_at: timestamp
  • updated_at: timestamp

Questions

  • id: int (primary key)
  • quiz_id: int (foreign key to Quizzes table)
  • question: text
  • created_at: timestamp
  • updated_at: timestamp

Answers

  • id: int (primary key)
  • question_id: int (foreign key to Questions table)
  • answer: text
  • correct: boolean
  • created_at: timestamp
  • updated_at: timestamp

Note: This is just an example schema, and you may need to modify it based on the specific requirements.

Instalation

Clone this repository and install dependencies:

git clone https://github.com/BaseMax/EducationalMVCPlatformPHP.git
cd EducationalMVCPlatformPHP
composer install

Now copy .env.example to .env and fill database credentials in .env file:

cp .env.example .env

You can run the project now:

cd public
php -S localhost:5000

Authors

  • Ali Ahmadi
  • Max Base

Copyright 2023, Max Base

educationalmvcplatformphp's People

Contributors

aliiahmadi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

metanoia2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.