|
1 |
| -# README |
2 | 1 |
|
3 |
| -Based on [https://github.com/pssl16/moodle-repository_owncloud](https://github.com/pssl16/moodle-repository_owncloud) |
4 | 2 |
|
5 |
| -Documentation is WIP |
| 3 | +# Installation |
| 4 | + |
| 5 | +- Download the [Moodle Nextcloud Repository plugin from the release page](https://github.com/daita/moodle-repository_nextcloud/releases) |
| 6 | +- Download the [Moodle Tool OAuth2 from pssl16](https://github.com/pssl16/moodle-tool_oauth2owncloud/releases) |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | +# Configuration |
| 11 | + |
| 12 | +- 1 - Setup the Oauth2 information in Nextcloud. |
| 13 | + |
| 14 | +From your admin account, navigate to the _Security_ settings page to add a new entry for your moodle in the _OAuth 2.0 clients_ list. |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +In the **Add client** form, choose a name and set up the redirection URI to your moodle that will redirect your user after authentication. |
| 19 | +> Note: The **Redirection URI** have to be https://yourmoodle.example.com/admin/oauth2callback.php |
| 20 | +
|
| 21 | +After clicking the **Add** button, you should see the Client Identifier and a Secret key in front of your freshly created entry. Those 2 strings will be used in _moodle_ during the setup of this plugin. |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | +*** |
| 27 | +- 2 - Setup the moodle-tool_oauth2owncloud |
| 28 | + |
| 29 | +From the moodle site administration, in the plugins tab, select Admin tools/ownCloud OAuth 2.0 Configuration. |
| 30 | + |
| 31 | + |
| 32 | +Fill the correct information using the **Client ID** and the **Secret** you get from Nextcloud (see the first step of this guide). |
| 33 | +Enter the Nextcloud server address and the webdav path: `remote.php/webdav/`. Select the right Protocol and change the port if needed. |
| 34 | + |
| 35 | +Save changes. |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +*** |
| 41 | +- 3 - From the moodle site administration, in the plugins tab, select **Repositories/Nextcloud**. |
| 42 | + |
| 43 | +You will be prompted to define a name to the plugin (default is Nextcloud). |
| 44 | +After that, you will see the list of all available repositories on your Moodle. Search for **Nextcloud** and set its Active status to '_Enabled and Visible_' |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +*** |
| 50 | + |
| 51 | +Your plugin is now configured, If you navigate to your **Private files** you should see the Nextcloud repository and log into your account. |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | +# More information |
| 57 | + |
| 58 | +Plugin is based on [https://github.com/pssl16/moodle-repository_owncloud](https://github.com/pssl16/moodle-repository_owncloud) |
0 commit comments