holyhope / lti-wims

LTI Interface for Wims LMS
0 stars 0 forks source link

Wims LTI

/!\ Version alpha

This project bring LTI protocol support to Wims. The main goal of this application is that Wims will be able to interact with Moodle.

Request from LMS

Technical details

Class Dependencies

Installation

This applicaton is dependant from Wims. It should be linked to a valid database, and the Wims instance should be active.

First of all, please start Wims and a database.

Installation on a dedicated server

Classic installation requires a dedicated web server. See below for more details.

Requirements

How to install?

  1. Download the latest version to /var/www
    git clone https://github.com/holyhope/lti-wims.git /var/www
  2. Populate the database wims /var/www/db/install.sql
  3. share wims folder with lti-wims
    ln -s /home/wims /var/wims
  4. Write /var/www/config.php

    <?php
    namespace LTI;
    
    const ROOT_PATH     = __DIR__;
    const TEMPLATE_PATH = ROOT_PATH . '/templates';
    const CLASS_PATH    = ROOT_PATH . '/classes';
    
    const DB_NAME     = 'wims_lti';
    const DB_USER     = 'lti';
    const DB_PASSWORD = 'myPassword';
    const DB_HOST     = '192.168.1.15';
    const DB_PORT     = '3306';
    const DB_DRIVER   = 'mysql';  // Should be one of PDO::getAvailableDrivers()
    const DB_PREFIX   = '';       // The prefix of table

Installation using docker

This application contains a dockerfile, feel free to change and build your own image.

Requirements

You can also use the wims and postgres docker image.

docker run -d -p 8080:80 -v /mnt/wims:/var/www wims
docker run -d -p 5432:5432 -e POSTGRES_DB=wims_lti -e POSTGRES_USER=lti -e POSTGRES_PASSWORD=myPassword postgres

How to install?

  1. Download the latest version to ~/wims-lti
    git clone https://github.com/holyhope/lti-wims.git /var/www
  2. Populate the database wims ~/wims-lti/db/install.sql
    psql -f ~/wims-lti/db/install.sql -U lti wims_lti
  3. Write ~/wims-lti/config.php

    <?php
    namespace LTI;
    
    const ROOT_PATH     = __DIR__;
    const TEMPLATE_PATH = ROOT_PATH . '/templates';
    const CLASS_PATH    = ROOT_PATH . '/classes';
    
    const DB_NAME     = 'wims_lti';
    const DB_USER     = 'lti';
    const DB_PASSWORD = 'myPassword';
    const DB_HOST     = 'localhost';
    const DB_PORT     = '5432';
    const DB_DRIVER   = 'pgsql';  // Should be one of PDO::getAvailableDrivers()
    const DB_PREFIX   = '';       // The prefix of table
  4. Build and run the docker image
    docker build -t lti-wims ~/wims-lti
    docker run -d -v /mnt/wims:/var/wims -p 80:80 lti-wims

How to configure

Moodle

Add an external activity in your course with the server data. You do not need ann OAuth token, it is disabled (Issue#3).