Skip to content

Commit 28dcf51

Browse files
committedMay 16, 2019
Started doc
1 parent f676e1e commit 28dcf51

12 files changed

+831
-166
lines changed
 

‎docs/.readthedocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
requirements_file: requirements.txt
File renamed without changes.

‎docs/LICENSE.md

+676
Large diffs are not rendered by default.

‎docs/index.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[![Build Status](https://travis-ci.org/PremierLangage/wims-lti.svg?branch=master)](https://travis-ci.org/PremierLangage/wims-lti)
2+
[![codecov](https://codecov.io/gh/PremierLangage/wims-lti/branch/master/graph/badge.svg)](https://codecov.io/gh/PremierLangage/wims-lti)
3+
[![GPLv3](https://img.shields.io/badge/license-GPLv3-brightgreen.svg)](#)
4+
5+
6+
# Introduction
7+
8+
**WIMS-LTI** is a gateway server that links a *LMS* to a *WIMS* server, using *LTI*.
9+
10+
**WIMS-LTI** allows :
11+
12+
* To create a *WIMS* class associated to a *LMS*' course.
13+
* To create students corresponding to that course in the *WIMS* class.
14+
* The students to connect to the *WIMS* server from the *LMS*.
15+
* The teachers to connect to the *WIMS* class as supervisor or as students.
16+
* To send the grades of students back to the LMS.
17+
18+
19+
## How does it work ?
20+
21+
Once **WIMS-LTI** is installed and running, it is possible to add *LMS* and *WIMS* server
22+
from the administration panel, each WIMS server having a list of authorized LMS.
23+
24+
Teacher will then be able to go on `[server]/lti/links/` to get the URL that should be
25+
paste on the LMS.
26+
27+
There is two kinds of URL:
28+
29+
* Class URL : Create a new class and redirect to the class' home on WIMS the first time it is
30+
clicked on from a LMS, only redirect to the class' home on subsequent click. It will also create
31+
a corresponding user on the WIMS user if needed.
32+
* Activity URL : Will redirect an user to the corresponding worksheet, creating the user if needed.
33+
If someone with a role of Teacher click on this link, it will also send every grade of the
34+
corresponding sheet to the LMS.

‎docs/installation.md

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Installation
2+
3+
## Dependencies
4+
5+
* Python 3.5+
6+
* pip3
7+
* Apache2 & mod_wsgi
8+
9+
10+
First, you need to clone the repositoy:
11+
12+
```bash
13+
git clone https://openproject.u-pem.fr/git/wims-lti.git
14+
cd wims-lti
15+
```
16+
Then, you have to edit `wimsLTI/config.py` to change some default parameters,
17+
see [Parameters reference](https://docs.djangoproject.com/fr/2.1/ref/settings/).
18+
First, it's important to set `DEBUG = False` and to modify:
19+
[`SECRET_KEY`](https://docs.djangoproject.com/fr/2.1/ref/settings/#std:setting-SECRET_KEY) et
20+
[`ALLOWED_HOSTS`](https://docs.djangoproject.com/fr/2.1/ref/settings/#allowed-hosts).
21+
22+
Once parameter correctly defined, then launch the installation script.
23+
It will ask for a user name, an email address, and a password to create
24+
an administration account.
25+
26+
***Careful: If you are using a [python environment](https://docs.python.org/fr/3/tutorial/venv.html),
27+
remember to use it.***
28+
29+
```bash
30+
./install.sh
31+
```
32+
33+
Now, you only have to configure *Apache*,
34+
see [the documentation](https://docs.djangoproject.com/fr/2.1/howto/deployment/wsgi/modwsgi/).
35+
36+
## Configuration
37+
38+
### WIMS side
39+
40+
In order to have the *WIMS* server to accept **WIMS-LTI** requests, you have to create
41+
a connection file. The creation of this file is explained
42+
[here](https://wimsapi.readthedocs.io/#configuration)
43+
44+
It is important to add the IP address of the **WIMS-LTI gateway** to the
45+
`ident_site` key and not the ip of the *LMS*
46+
Remember the value of the `ident_password` and the name of the created file,
47+
you will need these to add the server to **WIMS-LTI**.
48+
49+
50+
### WIMS-LTI side
51+
52+
1. Connect to `[WIMS-LTI SERVEUR]/admin/` and enter the administration
53+
account login and password that you got when you installed the server.
54+
55+
2. Click on `wims` (or go to `[WIMS-LTI SERVEUR]/admin/wims/wims/`)
56+
57+
3. Click `ADD WIMS` in the top left, and fill the form:
58+
* `DNS` : DNS of the *WIMS* server, ex: `wims.unice.fr`.
59+
* `URL` : URL of the *WIMS* server CGI, ex: `https://wims.unice.fr/wims/wims.cgi`.
60+
* `Name` : Name to identify the *WIMS* server, ex: `WIMS UNICE`.
61+
* `Ident` : Name of the connection file created on the *WIMS* server.
62+
For example, if the file created was `[WIMS_HOME]/log/classes/.connections/myself`,
63+
enter `myself`.
64+
* `Passwd` : Value of the key `ident_password` of the configuration file *Ident*.
65+
* `Rclass` : Identifiers used by *WIMS-LTI* to create classes on the *WIMS* server,
66+
for example: `myclass`.
67+
68+
Repeat ***3.*** for each *WIMS* server that you want to add.
69+
70+
4. Go back to `[WIMS-LTI SERVEUR]/admin/` and click on `LMS` (or go to
71+
`[WIMS-LTI SERVEUR]/admin/wims/lms/`)
72+
73+
5. Click `ADD LMS` in the top left and fill the form:
74+
* `UUID` : UUID of the *LMS* corresponding to the `tool_consumer_instance_guid` parameter
75+
of the LTI request. Most of the time, it is the DNS of the *LMS*.
76+
For example: `elearning.u-pem.fr`
77+
* `Name` : Name that identifies the *LMS*, for example: `Moodle UPEM`.
78+
* `URL` : URL of the *LMS*, for example: `https://elearning.u-pem.fr/`
79+
80+
Repeat ***5.*** for each *LMS* that you want to add.
81+
82+
83+
___
84+
85+
It is now possible to connect to any *WIMS* server added, from any *LMS* added, thanks to the URLs.
86+
87+
* `[WIMS-LTI SERVEUR]/dns/[WIMS DNS]/` -
88+
for example : `https://wims-lti.u-pem.fr/dns/wims.u-pem.fr/`
89+
90+
ou
91+
92+
* `[WIMS-LTI SERVEUR]/dns/[WIMS ID]/` - where `WIMS ID` is the ID of the *WIMS* server
93+
in the **WIMS-LTI** database,
94+
for example : `https://wims-lti.u-pem.fr/id/0/`
95+
96+
The list of the URLs can be found on the page `[WIMS-LTI SERVEUR]/list/`

‎docs/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mkdocs==1.0.4

‎install.sh

+11-7
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,14 @@ echo "pip3: OK !"
2222
command -v git >/dev/null 2>&1 || { echo >&2 "ERROR: git should be installed"; exit 1; }
2323
echo "git: OK !"
2424

25-
26-
2725
# Making sure changes to wimsLTI/config.py are not pushed
2826
git update-index --no-skip-worktree wimsLTI/config.py
2927

3028

3129

3230
# Checking if inside a python venv
3331
if [ "$VIRTUAL_ENV" == "" ]; then
34-
echo ""
32+
echo
3533
INVENV=1
3634
echo "WARNING: We recommend you to use a python virtual environment (https://docs.python.org/3/library/venv.html)." | fold -s
3735
read -p "Do you want to continue outside a virtual environment ? [Y/n] " -n 1 -r
@@ -45,7 +43,7 @@ fi
4543

4644

4745
# Getting requirement
48-
echo ""
46+
echo
4947
echo "Installing requirements..."
5048
pip3 install wheel || { echo>&2 "ERROR: pip3 install wheel failed" ; exit 1; }
5149
pip3 install -r requirements.txt || { echo>&2 "ERROR: pip3 install -r requirements.txt failed" ; exit 1; }
@@ -54,12 +52,18 @@ echo "Done !"
5452

5553

5654
# Building database
57-
echo ""
55+
echo
5856
echo "Configuring database..."
5957
python3 manage.py makemigrations || { echo>&2 "ERROR: python3 manage.py makemigrations failed" ; exit 1; }
6058
python3 manage.py migrate || { echo>&2 "ERROR: python3 manage.py migrate failed" ; exit 1; }
61-
python3 manage.py collectstatic || { echo>&2 "ERROR: python3 manage.py collectstatic failed" ; exit 1; }
59+
echo "Done !"
60+
6261

62+
# Collecting statics
63+
echo
64+
echo "Collecting statics..."
65+
python3 manage.py collectstatic || { echo>&2 "ERROR: python3 manage.py collectstatic failed" ; exit 1; }
66+
echo "Done !"
6367

6468

6569
# Creating super user
@@ -73,4 +77,4 @@ then
7377
python3 manage.py createsuperuser || { echo>&2 "ERROR: python3 manage.py createsuperuser failed" ; exit 1; }
7478
fi
7579

76-
echo "Run 'python3 manage.py createsuperuser' to create super users in the future."
80+
echo "Run 'python3 manage.py createsuperuser' to create superusers in the future."

‎mkdocs.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
site_name: WIMS-LTI Documentation
2+
site_author: Quentin Coumes
3+
repo_url: https://github.com/PremierLangage/wims-lti/
4+
5+
nav:
6+
- Introduction: index.md
7+
- Installation: installation.md
8+
- Configuration: configuration.md
9+
- License: LICENSE.md
10+
- Github: https://github.com/PremierLangage/wims-lti/
11+
12+
theme: readthedocs

‎translation/README_fr.md

-154
This file was deleted.

‎translation/flowchart.xml

-5
This file was deleted.

‎translation/flowchart_en.png

-47.6 KB
Binary file not shown.

‎translation/flowchart_fr.png

-45.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)
Please sign in to comment.