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!