Skip to content

Commit 593ad69

Browse files
committed
Updated README
1 parent 63a061c commit 593ad69

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

README.md

+30-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# External Content with Completion (EXPERIMENTAL BRANCH)
1+
# External Content with Completion
22
![Moodle Plugin CI](https://github.com/lushonline/moodle-mod_externalcontent/workflows/Moodle%20Plugin%20CI/badge.svg?branch=experimental)
33

44
The module enables a teacher to create a resource using the text editor.
@@ -23,31 +23,46 @@ the completion can then be imported using [moodle-tool_uploadexternalcontentresu
2323
git clone --branch experimental https://github.com/lushonline/moodle-mod_externalcontent.git mod/externalcontent
2424
```
2525

26-
## Configuring xAPI Realtime Tracking (Experimental)
26+
## Configuring xAPI Realtime Tracking (Experimental in v1.6-BETA)
2727

2828
The experimental xAPI Realtime Tracking implements basic LRS Statement API functionality.
2929

30-
Primarily:
30+
This allows an [Activity Provider (AP)](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-About.md#def-activity-provider) to send statements for External Content Activity items, that can be used to set the Moodle Viewed status and External Completed status for the item.
3131

32-
* [Statements Resource](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Communication.md#stmtres) - This is WRITE ONLY and so supports POST, PUT only. GET requests return a 401 Status
33-
* [About Resource](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Communication.md#aboutresource) - GET
32+
The received statements are not saved to Moodle, but parsed as received
3433

35-
The JSON statements received are parsed using [TinCan PHP](https://github.com/RusticiSoftware/TinCanPHP), and used to set the viewed status, completion status and score for the content if available.
34+
The Statement [Object Id](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#acturi) is used to identify the course and External Content Activity Item, the Moodle [Course ID Number](https://docs.moodle.org/310/en/Course_settings#Course_ID_number) needs to be set to this value.
35+
36+
The Statement [Actor Account Name](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#inversefunctional) is used to identify the Moodle User using their Moodle [Username](https://docs.moodle.org/310/en/Add_a_new_user#Username).
37+
38+
Any Statement [Verb Id](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#verb) received is used to set the Viewed status of the Activity. As Moodle does not support setting the timestamp for the Viewed event it will be the time that the statement was processed by the module.
39+
40+
If the Statement [Verb Id](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#verb) is one of those configured to indicate completion (Defaults are: http://adlnet.gov/expapi/verbs/completed and http://adlnet.gov/expapi/verbs/passed) the Activity Item "Completed Externally" value is set to true.
3641

37-
---
3842

39-
1. Configure the username/password which are used for basic authentication of the basic LRS endpoint. The defaults are random strings setup when module is installed.
40-
2. Set the xAPI verbs that will be used to indicate the content has been "completed", if a verb that matches one of these values is received the completed externally flag is updated. Any other verb simply sets the viewed flag. The defaults are http://adlnet.gov/expapi/verbs/completed and http://adlnet.gov/expapi/verbs/passed
43+
### What has been implemented
44+
|Resource|HTTP Methods|Comments|
45+
|------- |------------|-----------|
46+
|[Statements Resource](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Communication.md#stmtres)|GET, PUT, POST|This is WRITE ONLY and so supports POST, PUT only. GET requests return a "null" response so as to be "valid" but the functionality is not implemented. The JSON statements received are parsed using [TinCan PHP](https://github.com/RusticiSoftware/TinCanPHP), and used to set the viewed status, completion status and score for the content if available.|
47+
|[About Resource](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Communication.md#aboutresource)|GET|This returns tha xAPI version supported which for this is 1.0.0|
48+
<br>
4149

42-
Configure your external content provider to connect to the "basic" LRS implemented here:
50+
### Setup Activity Settings
51+
|Name|Setting|Description|
52+
|-----|-------|-----------|
53+
|Enable xAPI LRS basic support|xapienable|Enable the basic xAPI support, if disabled all calls to the xAPI endpoint return a 401 Unauthorized status. The default is enabled.|
54+
|xAPI LRS Username|xapiusername|Configure the username which is used for basic authentication of the basic LRS endpoint. The default is a random string, setup when module is installed.|
55+
|xAPI LRS Password|xapipassword|Configure the password which is used for basic authentication of the basic LRS endpoint. The default is a random string, setup when module is installed.|
56+
|List of completion xAPI verbs|xapicompletionverbs|Set the xAPI verbs that will be used to indicate the content has been "completed", if a verb that matches one of these values is received the completed externally flag is updated. Any other verb simply sets the viewed flag. The defaults are http://adlnet.gov/expapi/verbs/completed and http://adlnet.gov/expapi/verbs/passed|
4357

44-
- LRS - https://{moodlehostname}/mod/externalcontent/lrs/index.php
45-
- Authentication - Basic Authentication using the username/password you configured
58+
<br>
4659

47-
For the tracking to work:
60+
### Setup Activity Provider
61+
|Setup|Description|
62+
|------- |-----------|
63+
|LRS Endpoint|In your activity provider you need to configure the path to this modules LRS endpoint. This will be https://{moodlehostname}/mod/externalcontent/lrs/index.php|
64+
|Authentication|The modules LRS only supports Basic Authentication and so you will need to use the username/password you configured above.|
4865

49-
- Statement Object ID and the Moodle Course ID Numbers must match
50-
- Statement Actor must use the account [Inverse Functional Identifiers](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#inversefunctional) and the name must match the Moodle Username.
5166

5267
## License
5368

0 commit comments

Comments
 (0)