Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lti-xblock-consumer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenJupyter
lti-xblock-consumer
Commits
fb7abc91
Unverified
Commit
fb7abc91
authored
3 years ago
by
Ivan Gonzales
Browse files
Options
Downloads
Patches
Plain Diff
docs: update changelog
parent
2701ab53
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.rst
+52
-0
52 additions, 0 deletions
README.rst
with
52 additions
and
0 deletions
README.rst
+
52
−
0
View file @
fb7abc91
...
@@ -214,6 +214,53 @@ To configure parameter processors add the following snippet to your Ansible vari
...
@@ -214,6 +214,53 @@ To configure parameter processors add the following snippet to your Ansible vari
- 'customer_package.lti_processors:team_and_cohort'
- 'customer_package.lti_processors:team_and_cohort'
- 'example_package.lti_processors:extra_lti_params'
- 'example_package.lti_processors:extra_lti_params'
Dynamic LTI Custom Parameters
=============================
This XBlock gives us the capability to attach static and dynamic custom parameters in the custom parameters field,
in the case we need to declare a dynamic custom parameter we must set the value of the parameter as a templated parameter
wrapped with the tags '${' and '}' just like the following example:
.. code:: python
["static_param=static_value", "dynamic_custom_param=${templated_param_value}"]
Defining a dynamic LTI Custom Parameter Processor
-------------------------------------------------
The custom parameter processor is a function that expects an XBlock instance, and returns a ``string`` which should be the resolved value.
Exceptions must be handled by the processor itself.
.. code:: python
def get_course_name(xblock):
try:
course = CourseOverview.objects.get(id=xblock.course.id)
except CourseOverview.DoesNotExist:
log.error('Course does not exist.')
return ''
return course.display_name
Note. The processor function must return a ``string`` object.
Configuring the LTI Dynamic Custom Parameters Settings
------------------------------------------------------
The setting LTI_CUSTOM_PARAM_TEMPLATES must be set in order to map the template value for the dynamic custom parameter
as the following example:
.. code:: python
LTI_CUSTOM_PARAM_TEMPLATES = {
'templated_param_value': 'customer_package.module:func',
}
* 'templated_param_value': custom parameter template name.
* 'customer_package.module:func': custom parameter processor path and function name.
LTI Advantage Features
LTI Advantage Features
======================
======================
...
@@ -320,6 +367,11 @@ Changelog
...
@@ -320,6 +367,11 @@ Changelog
Please See the [releases tab](https://github.com/edx/xblock-lti-consumer/releases) for the complete changelog.
Please See the [releases tab](https://github.com/edx/xblock-lti-consumer/releases) for the complete changelog.
3.2.0 - 2022-01-18
-------------------
* Dynamic custom parameters support with the help of template parameter processors.
3.1.2 - 2021-11-12
3.1.2 - 2021-11-12
-------------------
-------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment