UA-eMath / eMath

new eMath system
2 stars 0 forks source link

eMath: Empowering Educational Interaction

eMath is a comprehensive system designed to empower professors and students in the creation and exploration of educational content. Professors can effortlessly author books within the platform, incorporating a variety of links such as references to other books in the database, links to webpages, links to modules for illustration and exploration, as well as quiz questions. This flexible environment fosters interactive learning experiences.

Key Features

Usage

  1. Professor Role
  1. Student Role
  1. Teaching Assistant Role
  1. Tester Role

Development Goals

  1. Database Migration: migrate the eMath system from a flat XML-DB to a proper DB backend, and to adapt the content presentation system to this new backend.

  2. Content Authoring Web Interface: create a web interface for content authors. Using this interface, content authors should be able to easily edit existing content, as well as create new content.

Getting Started

  1. Database(postgresql):

    • Install

      sudo apt update

      sudo apt install postgresql postgresql-contrib

    • Setup user

      enter postgresql shell: sudo -i -u postgres then psql (if not work, try psql postgres)

      CREATE DATABASE emathdb;
      CREATE USER admin WITH PASSWORD 'admin1234';
      GRANT ALL PRIVILEGES ON DATABASE emathdb TO admin;
    • Useful commands

      • drop table
      DROP DATABASE emathdb;
      • exit \q then exit

      • export database

      pg_dump -U admin emathdb > emathdump.pgsql
      • (optional) to get some sample data, run psql emathdb < emathdb.sql to restore data from sql file.
  2. Backend(Django):

    Prerequisites:

    python 3.7.x pip3

    setup virtual environment

    python3 -m venv venv
    source venv/bin/activate

    to deactivate simply do deactivate

    install packages

    cd eMath/backend/
    pip3 install -r requirements.txt
    

    apply database:

    python manage.py makemigrations
    python manage.py migrate

    run

    python manage.py runserver

    Django admin site

    create a admin account: python manage.py createsuperuser

  3. Frontend(React):

    Prerequisites:

    nvm node version management (optional)

    install packages

    sudo apt install nodejs
    sudo apt install npm
    sudo apt install yarn
    
    cd eMath/frontend
    yarn add

    Run

    yarn start

Google OAuth Integration

eMath offers the convenience of logging in through both traditional username/password credentials and Google accounts. To enable Google OAuth integration, follow these steps:

  1. Create Google OAuth Credentials:
  1. Update Settings: