This Xblock adds configurability over the original lti_consumer xblock from edx
Project description
Configurable LTI Consumer XBlock
This XBlock is used to replace edX's lti_consumer xblock. It makes available to conceptors in CMS several preconfigured versions of LTI Consumer original XBlock. Preconfigured fields are no longer modifiable.
Installation
This package can be installed with pip
:
$ pip install [--process-dependency-links] configurable_lti_consumer-xblock
Note that the --process-dependency-links
pip
option is only required to
install or test this Xblock as a standalone package. If you plan to install it
in a base Open edX installation, then you can safely miss this option as the
only package dependency should already have been resolved.
Configuration example
The below example configuration instanciate 2 xblocks.
CONFIGURABLE_XBLOCKS_SETTINGS = {
"components": [{
"module": "lti_consumer",
"base_class": "ConfigurableLtiConsumerXBlock",
"subclasses": [{
"name": "Demo LTI Service",
"display": "Demo LTI xblock",
"lti": {
"key": "jisc.ac.uk",
"secret": "secret",
},
"default_values": {
"description": "Demo",
"lti_id": "",
"launch_target": "iframe",
"launch_url": "http://ltiapps.net/test/tp.php",
"custom_parameters": [],
"button_text": "button",
"inline_height": 800,
"modal_height": 800,
"modal_width": 80,
"has_score": False,
"weight": 0,
"hide_launch": False,
"accept_grades_past_due": False,
"ask_to_send_username": True,
"ask_to_send_email": True
}
},{
"name": "Generic",
"display": "Generic LTI xblock",
"default_values": {
"description": "Generic",
"ask_to_send_username": True,
"ask_to_send_email": True
}
}]
}]
}
You also need to set XBLOCK_SELECT_FUNCTION setting to enforce configurable_lti_consumer endpoint over lti_consumer's one.
try:
from configurable_lti_consumer import configurable_xblocks
XBLOCK_SELECT_FUNCTION = configurable_xblocks
except ImportError:
pass
Studio integration
For now studio integration is made by inserting utils.configurable_xblocks
function call in edx-platform/cms/djangoapps/contentstore/views/component.py
.
It adds to preconfigured xblocks "Advanced" button.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for configurable_lti_consumer-xblock-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 228e3eea649c244e7ba993b49ef737478b4ef7b99f0d563f6c7361d648f3b7f3 |
|
MD5 | df6a6f724c77ff31a26c0f91effdd82d |
|
BLAKE2b-256 | 23688974c8a191acfb19ff9c6f7561a63edb5798d426ec78bceae84214b33b8b |
Hashes for configurable_lti_consumer_xblock-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfcdd5f05558b8a2b5376c4164f4adb0f2ebc3bb9a835dddfb27a3000f78765d |
|
MD5 | 5dc75689285220e2e82fd7479d747aea |
|
BLAKE2b-256 | 6c8f27e5dac97e4883361bcd09963ca33927dc54f557fe452e6b249e102b5755 |