Picture of Antonia Newey
Connect Authoring tool to LRS
by Antonia Newey - Wednesday, 22 November 2017, 9:55 AM
 

Hi,

I'm looking to connect the data stored on my course into the (sandbox demo version of) the Yet LRS. I have never used this kind of thing before, so would be grateful for any help you could provide. In the authoring tool I have the tracking hub and the tkhub xAPI channel handler installed, but I honestly don't know where to start linking everything up together.

I've tried to create a channel, which is what I assumed I was meant to do, but was told I used an invalid URL. I had added the 'xAPI path' of my test data store. And anyway, I don't know what I would do from there.

I'm sorry to give such a vague request for help, but I lack the proper knowledge to move on and ask something specific.

Kind Regards,

Antonia

Picture of Antonia Newey
Re: Connect Authoring tool to LRS
by Antonia Newey - Wednesday, 22 November 2017, 11:09 AM
 

I think I might have made some progress, but I'm getting infinite loading and this error:

 

xapiChannelCache.js:145 
 
Uncaught TypeError: Cannot read property 'sendStatement' of undefined
    at Cache.sendStatement (xapiChannelCache.js:145)
    at Object.deliverMsg (xapiChannelHandler.js:397)
    at Object.processEvent (xapiChannelHandler.js:372)
    at Object.<anonymous> (adapt-trackingHub.js:394)
    at underscore.min.js:5
    at Function.m.each.m.forEach (underscore.min.js:5)
    at Object.dispatchTrackedMsg (adapt-trackingHub.js:393)
    at Object.<anonymous> (adapt-trackingHub.js:383)
    at _ (backbone.min.js:2)
    at m (backbone.min.js:2)
 
The LRS info I have is the xAPI Path, API Key and API Secret Key, and I used these in the tkhub xAPI Channel Handler Channel URL, Username, and Password respectively.
Picture of Antonia Newey
Re: Connect Authoring tool to LRS
by Antonia Newey - Wednesday, 22 November 2017, 11:40 AM
 

Sorry, and again. Loads fine, but doesn't send statements correctly. Here's a screenshot of the console errors:

https://ibb.co/kFgKA6

It's trying to send them to the channel url but with /statements on the end, which makes sense except that it doesn't exist in Yet. I don't know if I need to do anything on the Yet end of things. 

 

 

 

Picture of jPablo Caballero
Re: Connect Authoring tool to LRS
by jPablo Caballero - Wednesday, 22 November 2017, 11:49 AM
 

 Hi Antonia,

I'm the author of those extensions. I need some more info to help you. First, How are you launching your course? Also... I would need to know the configuration you've used for both adapt-trackingHub and adapt-tkhub-xAPI.

Since you're using the Authoring Tool I guess you can't get to the configuration file itself... You can just list the config options you're using (or take a screenshot, whatever is easiest for you) 

 

Picture of Antonia Newey
Re: Connect Authoring tool to LRS
by Antonia Newey - Wednesday, 22 November 2017, 12:32 PM
 

Hi Pablo,

Thank you so much for replying so quickly! 

So I have been trying with just launching locally. It is also temporarily hosted on Amazon S^3 from the AWS, if this can't be done locally.

So attached are screenshots are of the configurations of both plugins. I've left a lot of things blank/default because I was a little unsure of the usage.

If there's anything else you need, please let me know!

Kind Regards,

Antonia 




Picture of jPablo Caballero
Re: Connect Authoring tool to LRS
by jPablo Caballero - Wednesday, 22 November 2017, 2:10 PM
 

Hi, I see a couple of things:

1- the Channel URL (which means, the xAPI endpoint) looks like it might be missing something... I put that address  in a browser and I get a Not Found error (which is consistent with the screenshot you sent with all the 404 errors in the console) ...  I'm not sure in YetAnalytics where the xAPI endpoint info is... but that's what you want in here. (btw, no need to share your access credentials...).  This is a biggie, but an easy fix, just need to find the right info.

2- a couple of changes in your configs:

trackingHub  browserchannel:

- (suggestion) change your course ID to something  that is meaninful to you, such as http://courses.antonia.com/mytestcourse1  or something ... doesn't need to be a real url, just a unique string (that's why it's good to build the url with something unique to you... your name or your company name etc.)

- change both isStateSource and isStateStore to false

in tkhub xAPI channel handler  (in your channel)

- set isStateSource to True

- set isLaunchManager to true  (important! one and only one channel should be the LaunchManager... and in your case, this is the one)

- (suggestion) you don't need to use anything in HomePage... it's only used with one of the other launch methods (doesn't hurt if you leave it, though)

 

Let me know how it goes.... the two critical things are the xaPI endpoint (channel url) and setting the xapi channel isLaunchManager to "true"

 

 

 

Picture of Antonia Newey
Re: Connect Authoring tool to LRS
by Antonia Newey - Wednesday, 22 November 2017, 3:06 PM
 

Hello again!

So I've implemented the config changes you suggested, and I think changed the Channel URL to the correct endpoint (I think I'd got in a slight muddle between two very similar URLs). I am now getting a new error. There seems to be a problem with access control. Do you have any suggestions?

Thank you for all your help.

Kind Regards,

Antonia


Picture of jPablo Caballero
Re: Connect Authoring tool to LRS
by jPablo Caballero - Wednesday, 22 November 2017, 3:46 PM
 

I'm not sure why that's happening...   

Some 404 (Not Found) errors are actually ok (and expected): when the course tries to load the 'state' for a given user & course, the very first time, it will always get a 404 (because that 'state' doesn't exist in the LRS) ...

Do you get errors when the statements are sent too?

( I'm not sure why you get the  cross-origin error ... )

Picture of Antonia Newey
Re: Connect Authoring tool to LRS
by Antonia Newey - Wednesday, 22 November 2017, 3:47 PM
 

On loading, I get a pop-up with

localhost:5000 says:
Error loading data. Aborting.

From there I just get infinite loading screen, so I can't access the tests and provide any data for it to send across.

Picture of jPablo Caballero
Re: Connect Authoring tool to LRS
by jPablo Caballero - Wednesday, 22 November 2017, 4:00 PM
 

 

These errors seem to be related to state loading/saving ... I'd suggest to turn that off to see if things are working otherwise.

To do that, set isStateSource and isStateStore to false in your channel configuration.

 

Picture of Antonia Newey
Re: Connect Authoring tool to LRS
by Antonia Newey - Wednesday, 22 November 2017, 4:15 PM
 

That fixes the pop-up, but sends me back to almost the same errors I posted on the third comment. As below:


Picture of jPablo Caballero
Re: Connect Authoring tool to LRS
by jPablo Caballero - Wednesday, 22 November 2017, 4:33 PM
 

well, I see some 401 errors (unauthorized) and some 404 (Not found) ... they indicate different conditions. I can't see the complete urls, but even if I did I'm not sure I would have enough info to see what's going on.  

I'm pretty swamped at the moment, so I might not get to this until the weekend... but I'll get a trial Yet Analytics account and test an Adapt course with it... to see if I see anything significant...

Picture of Antonia Newey
Re: Connect Authoring tool to LRS
by Antonia Newey - Wednesday, 22 November 2017, 4:38 PM
 

Oh gosh! Thank you so much, but only if you have time. It would be awesome if you could help, but I don't want to put you out too much! I'll keep fiddling around, and will post back on here if I get anywhere!  :)

Picture of jPablo Caballero
Re: Connect Authoring tool to LRS
by jPablo Caballero - Wednesday, 22 November 2017, 4:58 PM
 

I should test this extension against other LRSs anyway (when I did this, I only tested using LearningLocker, I guess not all LRS offered free trials). I'll get notified if you post anything here. You can also find me in the Gitter rooms for Adapt. 

Picture of Antonia Newey
Re: Connect Authoring tool to LRS
by Antonia Newey - Thursday, 23 November 2017, 2:49 PM
 

Hi,

I thought I'd just give you a quick update! I worked out what was causing my problem: I'd made an error with the endpoint URL. I'm sorry to cause you all this trouble when it was completely on me! 

However, I do now have a couple of new errors (which I will put up in a new thread). The work never ends, eh?

Kind Regards,

Antonia

Picture of jPablo Caballero
Re: Connect Authoring tool to LRS
by jPablo Caballero - Thursday, 30 November 2017, 2:55 PM
 

Hi. Glad to hear that.

I haven't been able to test anything with the YetAnalytics LRS, as I'm swamped with work... and won't be able to do any Adapt work in a while...