Skip to content

Commit

Permalink
docs: external LRS configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Talha-Rizwan committed Dec 13, 2023
1 parent ceeed64 commit 8de3a9c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
25 changes: 23 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The XBlock SDK Workbench, including this XBlock, will be available on the list o
Installation for tutor
**********************

This method works with [tutor](https://github.com/overhangio/tutor).
This method works with `tutor <https://github.com/overhangio/tutor/>`__.

First, go to your requirements directory::

Expand All @@ -35,7 +35,7 @@ and build a new image::

In your studio, in your desired course, go to Advanced Settings and add `"openedx_cmi5_xblock"` in the Advanced Module List.

If you want to test the cmi5 content, then [here](https://github.com/overhangio/tutor) you can get a demo file to test:
If you want to test the cmi5 content, then `here <https://xapi.com/cmi5/example-course-templates/>`__ you can get demo files to test:

Development
***********
Expand All @@ -59,6 +59,27 @@ If you struggle with lms not displaying your cmi5 content in IFrame, then ``X_FR
Note: This is not the best practice to develop an XBlock, but it works if you don't want to build dev image.


Advanced Configuration For External LRS
***************************************

The cmi5 Xblock may be configured to enable Third-party Learning Record Store to keep record of xapi statements outside of LMS. To configure that, add the following to Tutor by creating a `plugin <https://docs.tutor.overhang.io/plugins/>`__::

hooks.Filters.ENV_PATCHES.add_item(
(
"openedx-common-settings",
"""
XBLOCK_SETTINGS["CMI5XBlock"] = {
"ACTIVITY_PROVIDER_KEY": "<LRS-activity-provider-key>",
"SECRET_KEY": "<LRS-secret-key>",
"EX_LRS_ENDPOINT": "<domain>/lrs/<LRS-app-id>/statements/"
# ... other settings
}"""
)
)

Note: This method is for enabling External LRS for CMI5-Xblock in Tutor.


Translating
*************

Expand Down
5 changes: 1 addition & 4 deletions openedx_cmi5_xblock/utils/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
import json

import requests
from requests.auth import HTTPBasicAuth
from django.core.validators import URLValidator
from requests.auth import HTTPBasicAuth
from webob import Response

# USERNAME = 'uEy9xZTOzB3fEr_JY78'
# PASSWORD = 's4qMwv9fDFceov_JxOU'


def json_response(data):
"""Generate a JSON response."""
Expand Down

0 comments on commit 8de3a9c

Please sign in to comment.