|
| 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/` |
0 commit comments