Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clarify docs and cleanup repor #10

Merged
merged 2 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest]
python-version: ['3.8', '3.12']
os: [ubuntu-22.04, ubuntu-latest]
python-version: ['3.11', '3.12']
toxenv: [quality, django32, django40]

steps:
Expand Down
30 changes: 16 additions & 14 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
name: Publish package to PyPi

on:
release:
types: [published]
push:
tags:
- '*'

jobs:

push:
runs-on: ubuntu-20.04

runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/openedx-cmi5-xblock
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.12"

- name: Install pip
run: pip install -r requirements/pip.txt
- name: Install setuptools and wheel
run: python -m pip install --upgrade pip setuptools wheel

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
41 changes: 34 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,54 @@ Xblock to integrate CMI5 content in Open edX. It provides following features
Setup
********************

Install CMI5 XBlock
Install CMI5 XBlock:

$ pip install openedx-cmi5-xblock
.. code-block:: bash

Enable XBlock in Studio
pip install openedx-cmi5-xblock

`Settings -> Advanced Settings -> Advanced Module List` add `openedx_cmi5_xblock`
Update course advanced settings by adding `openedx_cmi5_xblock` as shown in below image:

Use it in any of the units by adding `CMI5 Module` from Advanced blocks list
.. image:: https://github.com/edly-io/ai-coach-xblock/blob/master/docs/images/update_settings.png?raw=True
:alt: Update Advanced Settings

Go back to your course content. In the "Add New Component" section, click "Advanced", and then "CMI5 module". Click "Edit" on the newly-created module: this is where you will upload your content package. It should be a .zip file or a .xml file containing the cmi5 content.

The cmi5 unit will display a link in the studio and the LMS. Clicking on the link will take users to a new tab where they can interact with the cmi5 content.

.. image:: https://github.com/edly-io/ai-coach-xblock/blob/master/docs/images/studio_view.png?raw=True
:alt: Update Advanced Settings

.. image:: https://github.com/edly-io/ai-coach-xblock/blob/master/docs/images/lms_view.png?raw=True
:alt: Update Advanced Settings

Advanced configuration for sending data to LRS
**********************************************

CMI5 Xblock can be configured to push xAPI statements to a Third-party Learning Record Store. To configure that, use these settings

.. code-block::
.. code-block:: python

XBLOCK_SETTINGS["CMI5XBlock"] = {
"LRS_AUTH_KEY": "<LRS-activity-provider-key>",
"LRS_AUTH_SECRET": "<LRS-secret-key>",
"LRS_ENDPOINT": "<domain>/lrs/<LRS-app-id>/statements/"
# ... other settings
}

These settings may be added using Tutor by creating a `tutor plugin <https://docs.tutor.overhang.io/plugins/>`__:

.. code-block:: python

from tutor import hooks

hooks.Filters.ENV_PATCHES.add_item(
(
"openedx-common-settings",
"""
XBLOCK_SETTINGS["CMI5XBlock"] = {
"LRS_AUTH_KEY": "<LRS-activity-provider-key>",
"LRS_AUTH_SECRET": "<LRS-secret-key>",
"LRS_ENDPOINT": "<domain>/lrs/<LRS-app-id>/statements/"
}"""
)
)
230 changes: 0 additions & 230 deletions docs/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions docs/_static/theme_overrides.css

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog.rst

This file was deleted.

2 changes: 0 additions & 2 deletions docs/concepts/index.rst

This file was deleted.

Loading