Opencast LTI integration testing with Canvas/Moodle

275 views
Skip to first unread message

Paul Gration

unread,
Nov 15, 2017, 10:58:57 AM11/15/17
to us...@opencast.org
I've been looking at how LTI integration works between Opencast and a
couple of VLE's for testing - Moodle/Canvas.
Based on the docs[1], it seems that the suggested integration is based
on the role permissions for a series/event which map to the LTI
`context_id` and `roles` parameters passed from the LTI consumer.

E.g. The following LTI parameters would grant access to any series/event
that has the role permission Course1_Learner:

context_id=Course1
roles=Learner

However, a Canvas context_id always seems to be a long random
string/hash (e.g. context_id: 88935db1d505f9c8df590947ed78185a585f8128)
from which you can't determine the associated course within Canvas[2],
even through the APIs[3]. There doesn't seem to be a way of overriding
the value of the context_id to set it to a meaningful name (Course Code
for example), so series identifiers in Opencast would need to match this
unfriendly hash string but we'd also need to know this value in advance
when creating recordings (with Galicaster for example).
Canvas also sends the Course Code as `context_label` and Course Name as
`context_title` which would seem like more sensible names to use as a
series identifier.

Has anyone integrated Canvas with Opencast via LTI and managed to
configure the context_id with a meaningful name?

If not I'm wondering whether it might be worth making Opencast read a
custom parameter that defines which other parameter to use as the
context_id, e.g. `custom_context_id_param=context_label`, falling back
to `context_id` if the `custom_context_id_param` doesn't exist or the
value of the specified param isn't valid? Credit to Paul Pettit for this
idea, apparently this method/approach has been used by other LTI providers.


With Moodle, it seems the `context_id` maps nicely to the course id so
the same issue isn't present here. However I'm a bit confused about how
to do variable substitution in Moodle when setting up the tool..

In Canvas I would set the custom fields to be:

tool=ltitools/series/index.html
series=$Context.id

In Moodle, there doesn't appear to be a way to substitute the
course/context_id to have it automatically configured per course. Has
anyone managed to achieve this? Not really an Opencast issue but others
may have figured this out - at the moment I'm just hard coding the
course id for the custom series parameter.

Thanks,

Paul

[1] https://docs.opencast.org/develop/admin/modules/ltimodule/#lti-roles
[2] https://community.canvaslms.com/thread/19463-search-courses-by-contextid
[3] https://canvas.instructure.com/doc/api/index.html

--
Paul Gration
Multimedia Development
University of Sussex
+44 (0) 1273 873269

fish slippery

unread,
Jul 30, 2019, 7:44:39 PM7/30/19
to Opencast Users
I have the same question.

Dietmar Zenker

unread,
Jul 31, 2019, 5:28:58 AM7/31/19
to Opencast Users
Hi Paul,

we are not using Moodle or Canvas but ILIAS as VLE, therefore I can only describe how the LTI integration of ILIAS and Opencast is realized in our setting.

In ILIAS, the LTI configuration can be configured in a very flexible way by XML definition (I don't know if there are similar config options in Moodle and Canvas). In our LTI setting, the contextID is NOT passed to Opencast directly, but it is used to construct the roles that are allowed to have read or write access to the appropriate series:
    <field name="LTI_ROLES" type="calculated" function="selectByName">
        <param name="value">{ILIAS_USER_WRITE_ACCESS}</param>
        <param name="1">INSTRUCTOR</param>
        <param name="0">LEARNER</param>
    </field>
    <field name="ALL_LTI_ROLES" type="template" encoding="">
        <template><![CDATA[{GLOBAL_ILIAS_LTI_ROLE},{GLOBAL_ILIAS_LTI_PREFIX}_{ILIAS_CONTEXT_ID}_{LTI_ROLES}]]></template>
    </field>
As a result, if the user has, for example, write access to the course with ID "12345678" (which represents the CONTEXT_ID), the resulting role is "SOME-PREFIX_12345678_INSTRUCTOR" (a screenshot of exemplary data that is passed to Opencast is attached).

If you have the option to configure this in a similar way, you could use "context_label" or "context_title" to construct the appropriate roles that should be passed to Opencast.

Hope that helps,

greetings,
Dietmar

ILIAS Opencast LTI data.png
Reply all
Reply to author
Forward
0 new messages