Code Monkey home page Code Monkey logo

thanhhung2112 / lms_nextgen Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 2.0 161.15 MB

An AI assistant for a Learning Management System (LMS)

Home Page: https://www.youtube.com/watch?v=x4RD210nYdc&t=13s

Jupyter Notebook 0.83% Python 0.06% PHP 72.73% Perl 0.08% HTML 0.35% C 1.23% C++ 0.03% Batchfile 0.01% Awk 0.01% JavaScript 16.30% Gherkin 3.77% Mustache 2.01% CSS 2.06% SCSS 0.50% XSLT 0.02% Ruby 0.01% Hack 0.01% Visual Basic 6.0 0.01% Pascal 0.02%
educational-project english-grammar lms moodle nlp tranfer-learning transformer natural-language-inference course-recommendation grammar-error-correction

lms_nextgen's Introduction

LMSNextGen

LMSNextGen is an LMS system integrated with AI features. This repository follows the structured approach outlined by DEHA Company and encompasses three key functionalities:

  1. Recommendation System:
    • Feature dedicated to providing personalized recommendations based on user preferences and behavior.
  2. Auto-Generated and Auto-Graded Assignments:
    • Streamlined functionality allowing automatic generation and grading of assignments using uploaded documentation.
  3. Grammar Error Correction and Grading English Writing Tasks:
    • Incorporates capabilities for identifying and correcting grammar errors, along with grading English writing tasks based on the CEFR (Common European Framework of Reference for Languages) level.

This project aims to offer a comprehensive Learning Management System (LMS) with a focus on user-friendly features and efficient task management.

Feel free to explore the code and use it as a reference for your own projects and don't forget to star this ๐Ÿ˜

Features

  1. Recommend couses based on enrolled course and course skills.
  2. Automatic generation of assignments from documentation files (PDF, DOC, DOCX, TXT).
  3. Automated assignment grading.
  4. Grammar error correction.
  5. Tenses prediction.
  6. CEFR levels prediction.

If you feel interesting in our model concept, check Traning folder and gec.ipynb notebook for a deeper understanding.

Demo Project

Watch the demo video by clicking on the image below ๐Ÿ‘‡๐Ÿป

Watch the video

Technology Stack

  1. Backend and Frontend: Moodle

    • Moodle serves as the backend and frontend for the LMS, handling course management, user authentication, and providing an intuitive interface for users.
  2. API Design and Integration: Flask

    • Flask is used to design and implement APIs for integrating AI features into the LMS. These APIs facilitate communication between the AI modules and the Moodle system, allowing seamless integration of recommendation systems, assignment generation, and grammar error correction functionalities.
  3. Pretrained Models:

    • T5 Transformer: Utilized for natural language processing tasks such as text generation and grammar error correction.
    • BERT (Bidirectional Encoder Representations from Transformers): Used for tasks such as text classification and language understanding.



Installation

For detailed installation instructions, please refer to this guide (in vietnamese).

Install Moodle

Database requiements:

  • MariaDB>=10.6.7
  • MySQL>=8.0
  • Postgres==13
  • Oracle=19c
  1. Access Moodle and download version 4.1.6.
  2. After extract the downdload file, Run the file Start Moodle.exe in your folder.
  3. Run XAMPP in the directory server/xampp-control.exe. You might get some error in when running Moodle. However, don't worry just follows the instruction of Moodle and Fix these error

Moodle Error

In XAMPP GUI, Click on Config then select config PHP (php.ini). Following the Moodle instruction and comment or uncomment the necessary library or extension.

image

Implement AI Features

1. Replace moodle fodler

Replace sever/moodle folder in Moodle with this folder, note that you have to make sure that the folder name is moodle after replacing.

2. Open Shell

Run xampp-control.exe and open Shell in XAMPP GUI. Other terminal won work in this situation.

3. To upgrade your database. Run the following commands.

cd sever/moodle
php admin/cli/upgrade.php

4. Migrate database Down load this database.sql

Run the SQL file in the Moodle database that you have initialized during the initial setup.

For the convenience of demonstrating AI features, the developers have decided to create additional tables with the prefix "mdl_demo". Note: These tables have not been designed in a rigorous manner and may have some degree of redundancy. They are mainly used for quickly demoing AI features.

image

5. Clear cache

To save changes to the Moodle system, it is necessary to clear the saved caches.

Select Site admin >> Development >> Debugging, then select option DEVELOPER: extra Moodle debug messages for developers in Debug messages

Finally, click on Purge all caches at the footer of the page

API Service

To set up the Python environment and necessary libraries to run this Flask application, you can follow the steps below:

Step 1: Install Python

First, you need to install Python on your computer. You can download Python from the official Python website (https://www.python.org/downloads/) and then install it following the instructions on the website.

Step 2: Download the directory containing the application models:

image

Download from the driver and unzip directly into the API_Service directory. Link download: pretrained model and sample training dataset

Step 3: Install Python libraries

Launch cmd, then navigate to the directory containing the Flask application source code using the cd command: image

cd <path to the API_Service Directory>

to perform the following tasks:

Using pip, you can install the necessary Python libraries for the Flask project. You can create a Python virtual environment to manage the project's libraries. Open a command prompt and execute the following commands:

Create a Python virtual environment (recommended to avoid version conflicts)

python -m venv myenv

Activate the virtual environment (on Windows)

myenv\Scripts\activate

Install libraries from the requirements.txt file

pip install -r requirements.txt

Activate the virtual environment (if not activated already)

myenv\Scripts\activate

Run the Flask application

python api_service.py

image

After executing all the above commands, your terminal will display the address where the application is running. Use this address to route service processing for the Moodle LMS system.

After running this command, the API Service will start and be ready to operate on your computer

Here's a guide on how to use each endpoint along with the corresponding payload and response:

Endpoint /questions-generate:

__Payload

{
   "uploaded_file_path": "/path/to/your/uploaded/file.txt"
}

__Response

{
   "summarize_texts": [
       {
           "id": 1,
           "summarize": "Summarized text 1"
       },
       {
           "id": 2,
           "summarize": "Summarized text 2"
       },
       ...
   ],
   "questions_generated": [
       {
           "id": 1,
           "question": "Generated Question 1",
           "answer": "Answer 1"
       },
       {
           "id": 2,
           "question": "Generated Question 2",
           "answer": "Answer 2"
       },
       ...
   ]
}

Endpoint /recommend-course:

__Payload

["Course ID 1", "Course ID 2", "Course ID 3"]

__Response

{
   "recommended_list": [4, 5, 6]
}

Endpoint /grammar-analysis

__Payload

{
   "student_answer": "Student's answer goes here."
}

__Response

{
   "student_answer": "Student's answer goes here.",
   "predicted_level": "Predicted English level",
   "corrected_texts": [
       {
           "id": 1,
           "corrected_text": "Corrected text 1"
       },
       {
           "id": 2,
           "corrected_text": "Corrected text 2"
       },
       ...
   ],
   "spell_check": [
       {
           "wrong": "Misspelled word",
           "correct": "Corrected word"
       },
       ...
   ],
   "grammar_check": [
       {
           "sentence": "Incorrect sentence",
           "tense": "Predicted tense"
       },
       ...
   ]
}

Endpoint /check-legit-answer:

__Payload

{
   "student_answer": "Student's answer goes here.",
   "summarize": "Summarized text to compare with"
}

__Response

{
   "label": "Label"
}

Acknowledgements

This app was built using the following open-source libraries, tools and datasets:

lms_nextgen's People

Contributors

lbqtrung avatar tdmvu18 avatar thanhhung2112 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hejazouli

lms_nextgen's Issues

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.