LTI-Tools and Moodle

124 views
Skip to first unread message

André Klaßen

unread,
Feb 25, 2013, 12:07:17 PM2/25/13
to matte...@opencast.org
Hi @all,

I'm trying to integrate the Matterhorn LTI-Tools into a Moodle. Unfortunately, I had no success so far. On one hand, I realized that the LTI-Tools included in the 1.3 release only consist out of one "Sample Page" and secondly, that the sample configuration offerd via http://opencast.jira.com/wiki/display/MH/LTI+-+Basics does not really work for the player of 1.4 release. Has anyone an idea how to get the LTI-Connection to a Moodle?

Kind regards,

André Klaßen

Dietmar Zenker

unread,
Feb 26, 2013, 8:16:46 AM2/26/13
to matte...@opencast.org
Hi André,

I could successfully integrate OC-MH in OLAT via LTI, and it works with 1.4 (as described in http://opencast.jira.com/wiki/display/MH/LTI+-+Basics).
I also tried to establish a connection in Moodle, but this failed in two different Moodle 2.x installations: when I try to integrate a series, the message "Loading recordings..." appears, but nothing happens, and when I try to integrate a single recording, the engage player comes up, but shows nothing but a "Media not found" message. Thus, it seems that the connection is established, but the further communication fails (I cannot further investigate this - we are not using Moodle...).

TELTEK works on a OC-MH Moodle integration (http://teltek.es/?p=693), perhaps this would be another option for you?

Greets,
Dietmar

David Horwitz

unread,
Feb 26, 2013, 8:47:44 AM2/26/13
to matte...@opencast.org, David Horwitz

Unfortunately I also don't have a moddle instance to test with. However if someone has one I can use I would gladly do some testing/debuging as part of the development.

Regards

David

UNIVERSITY OF CAPE TOWN

This e-mail is subject to the UCT ICT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 9111. This e-mail is intended only for the person(s) to whom it is addressed. If the e-mail has reached you in error, please notify the author. If you are not the intended recipient of the e-mail you may not use, disclose, copy, redirect or print the content. If this e-mail is not related to the business of UCT it is sent by the sender in the sender's individual capacity.

Tobias Wunden

unread,
Feb 27, 2013, 2:43:50 AM2/27/13
to matte...@opencast.org
Hi André,

I was able to use LTI with Matterhorn 1.4 and embed both the series tool as well as the player tool into a recent Moodle installation without any modifications on the Matterhorn end.

Tobias
> --
> You received this message because you are subscribed to the Google Groups "Matterhorn" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to matterhorn+...@opencast.org.
> To post to this group, send email to matte...@opencast.org.
> Visit this group at http://groups.google.com/a/opencast.org/group/matterhorn/?hl=en-US.
>
>

Tobias Wunden

unread,
Feb 27, 2013, 2:47:19 AM2/27/13
to matte...@opencast.org
Hi Dietmar,

this may well be due to the access settings in etc/security/mh_default_org.xml. If you look at your browser's web inspector, you may see some redirects to the Spring Security login page for a couple of your javascripts. If that is the case, make sure the javascripts can be loaded by the anonymous user (there is no need to protect them as far as I know).

If that solves the issue, please make sure to (soon) file a bug so this is fixed prior to the release of 1.4.

Tobias

Benjamin Wulff

unread,
Mar 19, 2013, 11:39:35 AM3/19/13
to matte...@opencast.org
Hi David,

we are setting up a moodle instance for testing (credentials send off-list ;). I can also install a Matterhorn if you wish...

Cheers,
Benjamin
This e-mail is subject to the UCT ICT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 9111. This e-mail is intended only for the person(s) to whom it is addressed. If the e-mail has reached you in error, please notify the author. If you are not the intended recipient of the e-mail you may not use, disclose, copy, redirect or print the content. If this e-mail is not related to the business of UCT it is sent by the sender in the sender's individual capacity. --

mohit shah

unread,
Jul 12, 2013, 1:52:26 PM7/12/13
to matte...@opencast.org
Hi Tobias,

Can I get some documentation for doing this? Installing MH LTI and integrating it with Moodle/Sakai? I am new to this and need some help to begin with. Thanks. I have this link but it only provides basic information : https://opencast.jira.com/wiki/display/MHDOC/Integrating+Matterhorn+in+an+LMS+with+The+LTI+module

Thanks again,
Mohit

Jimmy

unread,
Jul 16, 2013, 5:06:48 PM7/16/13
to matte...@opencast.org
I'm also having a hard time integrating Matterhorn with my LTI Consumer (I'm not using Moodle as the consumer, but another LMS that serves a similar function).  My questions/issues are as follows:

- According to the documentation provided at https://opencast.jira.com/wiki/display/MHDOC/Integrating+Matterhorn+in+an+LMS+with+The+LTI+module, the LTI module can be accessed at http://<matterhorn_url>/ltitools/index.html.  However in my case I do not have a page there.  I do have a page at http://<matterhorn_url>/ltisample/index.html.  Is this the correct equivalent?

- I was able to specify a CONSUMER_KEY and CONSUMER_SECRET in the configuration XML file, and also provide these to the LTI consumer, and this appears to be working correctly

- When configuring the LTI consumer, what do I provide as the LTI base URL?  If I try to use the above address (http://<matterhorn_url>/ltisample/index.html) then I get an error saying a POST operation cannot be completed.  If I instead use http://<matterhorn_url>/lti then I do get a page that directs me to another page, which gives me a link to a page that displays some LTI values that were received

- What do I use for the
custom_tool parameter?  I've tried several different values and none of them seem to do anything.  I did verify via wireshark that my LTI Consumer is correctly sending the custom_tool and custom_id fields, but the only thing I get back is the page that lists the LTI parameter values.  I'd like it to actually display a media player with a video.

Thanks in advance for the help!

Dietmar Zenker

unread,
Jul 17, 2013, 3:20:22 AM7/17/13
to matte...@opencast.org
Hi Jimmy,

I connect OLAT and Matterhorn via LTI using the following configuration:
In the LTI-Tool, I use http://[OCMH_SERVER_URL]/lti as base URL. In "special configuration", I define the following parameters for integration of a whole series:
test=false
tool=ltitools/series/index.html
series= [SERIES-ID]

and for a special recording:
test=false
tool=ltitools/player/index.html
id=[MEDIAPACKAGE-ID]


For testing purposes, I recommend to set the parameter test to true.

I hope this will help you,

Dietmar
Message has been deleted

David Horwitz

unread,
Jul 18, 2013, 3:38:48 AM7/18/13
to matte...@opencast.org
Hui Jimmy,

Make sure you have the paramarer test=false. Otherwise what version of Matterhorn are you running?

D

On Wed, 2013-07-17 at 06:32 -0700, Jimmy wrote:
Thanks for the response Dietmar.  Unfortunately I'm still having the same problem.  I changed the custom parameter names to "tool" and "id" as you suggested.  But I'm still getting the same thing - when my LTI Consumer launches its Tool, I first get a page that just has a link that says "continue..."  If I click on that link I'm taken to a page that says "This is a sample LTI tool.  Here's what we know about you and your context from the tool consumer."  And if I follow that link, I get a page that lists a bunch of parameters and their values.  Within those parameters I do NOT see "tool" and "id", even though I was able to verify via wireshark that these parameters are actually being sent to MH over the LTI connection.

Please help!


Jimmy

unread,
Jul 18, 2013, 11:51:51 AM7/18/13
to matte...@opencast.org

I was able to get it working.  The first problem was indeed that I was running version 1.3 of Matterhorn.  Once I moved to 1.4 I was able to see the Engage player when launching the LTI page.  The other problem was that MH was configured as a distributed setup, so the Core was on a different IP address from the Media Server.  I moved it back to being a single-server configuration and everything's working fine now.

Thanks again for the quick response.

Jimmy

Jimmy

unread,
Jul 22, 2013, 5:51:11 PM7/22/13
to matte...@opencast.org
So I've run into another snag, this time using Moodle as my LTI client.  I was able to configure an Activity in Moodle that points to Matterhorn as an LTI Provider.  Using the same URL and custom parameters as before, I connected the Moodle activity to the Matterhorn video.  When I log in as a student and go to the course page, I can launch the activity and see my Matterhorn-hosted video and everything works great.

However, when I log into Moodle as the Teacher of that class, an error results when I try to launch the activity.  The Moodle LTI page comes up with the Matterhorn engage player embedded within the page, however I do not see any video, I only see an error that reads "The media is not available."

I ran some wireshark captures in which I compared the network activity in the good case (logged in as a student) versus the bad case (logged in as a teacher).  The divergence occurs at the GET /search/episode.json request.  The request looks identical in both cases, however in the good case the response from the Matterhorn server looks like this:

HTTP/1.1 200 OK
Content-Type: application/x-javascript; charset=UTF-8
Date: Mon, 22 Jul 2013 19:48:50 GMT
Content-Length: 8588
Server: Jetty(6.1.x)

jQuery17209429137778630302_1374522382261({"search-results":{"searchTime":"1","total":"1","limit":"1","offset":"0","query":"(id:1f5bceb5\\-81c2\\-4c2a\\-8f53\\-ce9659a0a44e OR dc_is_part_of:1f5bceb5\\-81c2\\-4c2a\\-8f53\\-ce9659a0a44e) AND oc_organization:mh_default_org AND (oc_acl_read:2_Learner OR oc_acl_read:ROLE_ANONYMOUS OR oc_acl_read:ROLE_OAUTH_USER OR oc_acl_read:ROLE_USER) AND -oc_mediatype:Series AND -oc_deleted:[* TO *]","result":{"org":"mh_default_org","id":"1f5bceb5-81c2-4c2a-8f53-ce9659a0a44e","mediapackage":{"start":"2013-07-18T12:57:00Z","id":"1f5bceb5-81c2-4c2a-8f53-


Whereas in the bad case the response looks like this:

HTTP/1.1 500 org.apache.cxf.interceptor.Fault: org.apache.solr.client.solrj.SolrServerException: org.apache.solr.client.solrj.SolrServerException: org.apache.solr.client.solrj.SolrServerException: org.apache.solr.common.SolrException: org.apache.lucene.queryParser.ParseException: Cannot parse '(id:1f5bceb5\-81c2\-4c2a\-8f53\-ce9659a0a44e OR dc_is_part_of:1f5bceb5\-81c2\-4c2a\-8f53\-ce9659a0a44e) AND oc_organization:mh_default_org AND (oc_acl_read:2_Instructor OR oc_acl_read:2_urn:lti:sysrole:ims/lis/Administrator OR oc_acl_read:ROLE_ANONYMOUS OR oc_acl_read:ROLE_OAUTH_USER OR oc_acl_read:ROLE_USER) AND -oc_mediatype:Series AND -oc_deleted:[* TO *]': Encountered " ":" ": "" at line 1, column 189. Was expecting one of:     <AND> ...     <OR> ...     <NOT> ...     "+" ...     "-" ...     "(" ...     ")" ...     "*" ...     "^" ...     <QUOTED> ...     <TERM> ...     <FUZZY_SLOP> ...     <PREFIXTERM> ...     <WILDTERM> ...     "[" ...     "{" ...     <NUMBER> ...    
Content-Type: text/html; charset=iso-8859-1

The difference appears to be in the ocl_acl_read parameter.  In the good case it is set to

oc_acl_read:2_Learner OR oc_acl_read:ROLE_ANONYMOUS OR oc_acl_read:ROLE_OAUTH_USER OR oc_acl_read:ROLE_USER

where as in the bad case it is set to

oc_acl_read:2_Instructor OR oc_acl_read:2_urn:lti:sysrole:ims/lis/Administrator OR oc_acl_read:ROLE_ANONYMOUS OR oc_acl_read:ROLE_OAUTH_USER OR oc_acl_read:ROLE_USER


In other words, it appears that Matterhorn is not correctly interpreting either the 2_Instructor value or the ims/list/Administrator value.

As always, any help would be much appreciated!

Benjamin Wulff

unread,
Aug 27, 2013, 5:08:25 PM8/27/13
to matte...@opencast.org
Hi all,

I am currently at the point where Jimmy was some time ago (look below), thus continuing from there.

Unfortunately I can't move anything back into an all-in-one system (which solved Jimmy's problem). I have an Engage node (MH 1.4.0) behind an Apache2 reverse proxy. The system was working fine. Then I configured Matterhorn as LTI provider in Moodle and set up an instance of the series tool in a test course.
When I navigate to the Series tool I see the recordings list view with the message "loading results...", but now results are ever shown. So the LTI config seems to be working, at least the OAuth seems to be done correctly.
I also configured an instance of the player tool. When I navigate to this instance I see the initial player screen but after some time the message "Media is not available..." appears.

Investigating with Firebug I found out that the Episode endpoint was returning a 500 error. Looking at the Engage server log I found a lot of Solr exceptions, all saying that the query asking for the episode could not be parsed:

2013-08-27 14:46:42  INFO (LtiLaunchAuthenticationHandler:180) - Returning user with 5 authorities
2013-08-27 14:48:39 ERROR (SolrException:139) - org.apache.solr.common.SolrException: org.apache.lucene.queryParser.ParseException: Cannot parse '(id:b42ee235\-673b\-4730\-9961\-25385cab67aa OR dc_is_part_of:b42ee235\-673b\-4730\-9961\-25385cab67aa) AND oc_organization:mh_default_org AND (oc_acl_read:347_Instructor OR oc_acl_read:347_urn:lti:sysrole:ims/lis/Administrator OR oc_acl_read:ROLE_ANONYMOUS OR oc_acl_read:ROLE_OAUTH_USER OR oc_acl_read:ROLE_USER) AND -oc_mediatype:Series AND -oc_deleted:[* TO *]': Encountered " ":" ": "" at line 1, column 193.

Was expecting one of:
    <AND> ...
[...]

But the really amazing thing is that this happens now  *every time*  with  *every episode*  I want to retrieve no matter if I try from Moodle, the Admin UI or by pasting together a recording URL manually. Restarting Matterhorn doesn't help.

When I ingest a new recording, I can watch it without problems until I try to access something in Matterhorn from within Moodle. From that point on asking the episode endpoint for the new recording has the same effect as described above.

Now I'm really a bit confused since it feels like something is corrupting the episode index but I thought I was just querying the poor thing.

Any ideas?

Thanks in advance,
Benjamin
--
You received this message because you are subscribed to the Google Groups "Matterhorn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to matterhorn+...@opencast.org.
To post to this group, send email to matte...@opencast.org.

Tobias Wunden

unread,
Aug 28, 2013, 9:01:05 AM8/28/13
to matte...@opencast.org, matte...@opencast.org
Benjamin,

did you check if all related resources (especially javascript files) can be loaded ? Depending on the configuration, it is possible that you see a status of 302 instead of a 200 or a 304 (not modified).

Tobias

Benjamin Wulff

unread,
Aug 29, 2013, 8:29:08 AM8/29/13
to matte...@opencast.org
Hi Tobias,

all the web resources are loaded correctly. The frist thing in the list is the POST to http://<engage_node>/lti which returns code 302. Besides that the three GETs to http://<engage_node>/search/episode.json?... return code 500 with error message saying the query could not be parsed. All other requests return code 200.

Best regards,
Benjamin

Karen Dolan

unread,
Aug 29, 2013, 9:15:49 AM8/29/13
to matte...@opencast.org
Benjamin,

The javascripts in the Lti module expect that they live two paths downstream from the search REST endpoint path on the server Url. 

            url: '../../search/episode.json', <---- From player-multi-hybrid-intiialize.js

The normal place to put javascript files is two paths away ("/ui/js/[javascript file]")

              <outputDirectory>${basedir}/target/classes/ui/js</outputDirectory>  <-- from matterhorn-engage-ui pom.xml

The LTI pom.xml is placing the javascript files is three paths away ("/tools/shared/js/[javascript file]")

              <outputDirectory>${basedir}/target/classes/tools/shared/js</outputDirectory>  <-- from matterhorn-lti pom.xml

It's probably easier to change the pom.xml to use the javascript path identified in the matterhorn admin and engage pom.

Best of luck,
Karen


Benjamin Wulff

unread,
Aug 29, 2013, 10:52:26 AM8/29/13
to matte...@opencast.org
BTW: I gave it another try and de-configured the reverse proxy, so the Engage node is now reachable via port 8080 directly. The result, however, is the same as before:

I ingested a video, after processing it was distributed to the streaming server and I was able to watch it in the engage player. After I tried accessing it via Moodle/[the player LTI tool] it is broken, when I try to access it from the Admin UI I get 500 from the search/episode.json. Also, as before, this is the behaviour for all recordings in the system, restarting doesn't fix it.

Regards,
Ben


On 29.08.2013 14:29, Benjamin Wulff wrote:
Hi Tobias,

all the web resources are loaded correctly. The frist thing in the list is the POST to http://<engage_node>/lti which returns code 302. Besides that the three GETs to http://<engage_node>/search/episode.json?... return code 500 with error message saying the query could not be parsed. All other requests return code 200.

Best regards,
Benjamin

On 28.08.2013 15:01, Tobias Wunden wrote:

Per Pascal Grube

unread,
Sep 2, 2013, 5:37:57 AM9/2/13
to matte...@opencast.org
Benjamin,

did you try to use the Demo-Consumer provided by LTI instead of moodle?
I don't think that it should make a difference, but anyway it is an easy way to
give it a try.

I have a distributed MH1.4 running LTI, using Ilias as a consumer, and I do
not see this issue. But maybe my setup is different. I use xinetd to forward
the traffic to the jetty running on 443, serving ssl.

Regards, Pascal
Per Pascal Grube
Rechenzentrum
Universitaet Stuttgart Tel: ++49-711-685-60011
Allmandring 30a
70550 Stuttgart www.rus.uni-stuttgart.de


***********************************************************

Lukas Rohner

unread,
Sep 2, 2013, 7:20:21 AM9/2/13
to matte...@opencast.org
Hi all,

There is an issue in the workflow service not escaping special characters in the workflow solr index. This leads to the parse exception you mentioned, when an LTI user with special characters is queried.
https://opencast.jira.com/browse/MH-8924

I'm right now working on this and I guess this fix will solve the problems you are having.

Lukas
Reply all
Reply to author
Forward
0 new messages