I have successfully setup adapt authoring tool. But now when I create a course and download zip file, I unzip it and try to open index.html via mozilla browser. But all it does is show the spinner. I don't know what to do?
Have you tried previewing it from the AT first?
For folks to troubleshoot better, in these kind of cases, please describe your environment, (Win, Lin or Mac), which versions of AT & AF, etc.
As I have mentioned before, I have tried to serve the unzipped file via nginx. But all I see is the spinner. I am unable to see the content designed using the authoring tool. Also I have not used SPOOR extentions. But I have used acutilis adapt trackerhub plugin.
As I have mentioned before, I have tried to serve the unzipped file via nginx
Actually you didn't mention that before - you said 'I unzip it and try to open index.html via mozilla browser'.
Are you getting any errors in the browser console?
Oh. Sorry my mistake. Even when opening index.html via browser, I just get the spinner. I couldn't find any errors on the console either.
Since I am using the adapt trackerhub plugin, this is all that is visible on the console.
window.controllers is deprecated. Do not use it for UA detection. index.html
Initializing browserChannelHandler adapt.min.js:4:26412
Initializing xapiChannelHandler adapt.min.js:6:9354
trackingHub: starting launch sequence... adapt.min.js:5:2333
xapiChannelHandler LRS: starting launch sequence... adapt.min.js:6:12144
launch sequence finished. adapt.min.js:5:3339
xapiChannelHandler applying config to channel LRS adapt.min.js:6:10746
loading state... adapt.min.js:5:3571
xapiChannelHandler: state retrieving adapt.min.js:6:13750
given that the last message is 'state retrieving' maybe tracking hub is holding up the course while gets tracking data - but is unable to do so?
Maybe publish it without that plugin to see if that makes it work
Ok. I will try that and get back to you tomorrow.
I think that message comes from trackingHub, as Matt says.
In the configuration of your channel you should set "isStateSource" to "false", that way trackingHub won't attempt to load the state from that channel.
I have been reading the adapt-trackerhub docs and adapttkhub-xapi docs. The following two images describe my understanding of the concepts:
Part 1: How the channel handlers and adapt trackerhub store the xapi data to the LRS
Part 2: How the state object created by adapt tracker hub is shared by channel handlers(xapi handler in my case) to convert to xapi statements and send to LRS.
Based on the above understanding, I have added the plugins to my course content(adpat tracker hub and xapi extension) and the configuration is as follows:
Now I have configured the trackerHUb as follows:
Is enabled: true
Course ID: http://localhost/
Use Id: false
and for the browser channel handler:
BrowserChannel (default):
Is enabled: false
Reports Events: false
Tracks State: false
Is State Source: false
Is State Store: false
Is Launch Manager:false
And in my tkhub-xAPI I have configured it as follows:
tkhub xAPI Channel Handler:
Is enabled: true
and the details of the channel added are:
Channel name: LRS
Is enabled: true
Reports Events: true
Tracks State: true
Is State Source: true
Is State Store: true
Is Launch Manager: true
xAPI Launch Method: adlxapi
Is Fake LRS: false
Home Page:
Mbox Identity:
Hardcoded user name:
Channel URL:(empty)
Username:(empty)
Password:(empty)
After all this, I still get the spinner page.
Also, I didn't understand why the trackerhub's is_state_source should be disabled. Is there a mistake in my understanding so far. If so please correct it.
Hello Seema,
I think that your diagrams correctly show how it works.
The idea behind this model is that channel handlers can implement zero, one or more of these functionalities:
1- track events
2- create an arbitrary state representation (track state)
3- Load state (load a json object from the channel that somehow represents the Whole state, as represented by All channel handler that are used in the course)
4- Save state (save the global json object that contains the state representation of all channel handlers used in the coruse, to a persistence layer)
These functionalities can be enabled or disabled for each channel independently. This provides great flexibility, and I guess it causes some confusion.
In those plugins:
- adapt-trackingHub implements All 4 functionalities
- adapt-tkhub-xapi implements functionalities 1, 3 and 4.
In other words, the xapi plugin itself does not create a state representation. What we normally do is use the one implemented by the default browserChannel
So, in your situation, using trackingHub + tkhub-xapi, you should ENABLE browserChannel, and enable Only the tracksState option, In the xapi channel config, just disable "trakcsState" . This way, you will end up having all those 4 functionalities: 1, 3 and 4 from the xapi plugin, and 2 from the default browswerchannel.
This model allows developers to implement trackingHub plugins that implement only the functionality they need, for example if you wanted a totally different state representation, you would only need to create one plugin (similar in structure to tkhub-xapi) and only implement the "track state" functionality.
To answer your last question, a course COULD save state to more than one channel, but MUST always load the state from only 1 channel, The most common situation, however, is to load and save to only 1 channel. In your setup, you want to save the state to the LRS and load from the LRS only. So the default channelhandler should have isStateSource to false so trackingHub does not attempt to load the state from that channel ( which uses localstorage).. so your default browser channel shoud only TrackState, but nothing else, Your xapi channel should load and save state, and also track events.
I hope this helps, and I'm hoping to improve the documentation in the future so it is clearer...
Based on your suggestions, I made the following changes:
Now I have configured the trackerHUb as follows:
Is enabled: true
Course ID: http://10.1.1.13/
Use Id: false
and for the browser channel handler:
BrowserChannel (default):
Is enabled: true
Reports Events: true
Tracks State: true
Is State Source: false
Is State Store: false
Is Launch Manager:false
And in my tkhub-xAPI I have configured it as follows:
tkhub xAPI Channel Handler:
Is enabled: true
and the details of the channel added are:
Channel name: LRS
Is enabled: true
Reports Events: true
Tracks State: false
Is State Source: true
Is State Store: true
Is Launch Manager: true
xAPI Launch Method: adlxapi
Is Fake LRS: false
Home Page:
Mbox Identity:
Hardcoded user name:
Channel URL:
Username:
Password:
As you can see, I am using browserHandler for the state and xapiHandler for loading and saving the state.
But I have not provided the LRS endpoint. Now I am using xapi-launch server where I am launching the course. Even ADL_LRS is setup properly. But when I attempt to launch the course the outcome on the console was:
window.controllers is deprecated. Do not use it for UA detection. index.html
Initializing browserChannelHandler adapt.min.js:4:26412
Initializing xapiChannelHandler adapt.min.js:6:9354
trackingHub: starting launch sequence... adapt.min.js:5:2333
xapiChannelHandler LRS: starting launch sequence... adapt.min.js:6:12144
launch sequence finished. adapt.min.js:5:3339
xapiChannelHandler applying config to channel LRS adapt.min.js:6:10746
loading state... adapt.min.js:5:3571
xapiChannelHandler: state retrieving adapt.min.js:6:13750
--- content launched via xAPI Launch ---
Object { extended: Object, endpoint: "http://10.1.1.13:8005/launch/0a05e2…", actor: Object, withCredentials: true }
Object { actor: Object, endpoint: "http://10.1.1.13:8005/launch/0a05e2…", contextActivities: Object, customData: Object, sessionLength: 0, initializationCode: 0 } adapt.min.js:6:12279
The launch sequence was successful as you can see from the endpoint in the Object above.
But it still showing the spinner page and not making requests via the proxy endpoint provided.
Should I be specifying the LRS endpoint in the course/config.json? Because I thought the launch mechanism is to take care of that.
hhmmm... your config looks fine to me.
If you are using adl-xapi-launch... the endpoint will be provided automatically.. so no, you do not need to specify it in the launch sequence. I tested this with the sample server that adl provides (that implements xapi-launch)... is that what you are using?
I don't know why it is not working ... I guess it would be necessary to debug the state loading call in trackingHub, in the tihub-xapi and ... I'm traveling at this time and I don't have the tools to do that... I will be back at work next week... I will review this again to see if I find anything.
I am using ADL_LRS as my LRS. xapi-launch server as an LRS proxy to the content provider(adapt course). I am using adapt-trackerhub and the xapi extension to be the content provider(for xapi statements). I will wait for your response after a week as you said. But thanks for your help.
I have been debugging the downloaded content for the nearly two hours and in the adapt.min.js(after putting debugger; mostly everywhere) I find that the extensions from extensions/adapt-tkhub-xAPI/js/xapiChannelHandler are being loaded using define('plugin',[extensions/adapt-tkhub-xAPI/js/xapiChannelHandler,...and many more]) in requirejs. My question is how are these files loaded when there is no such directory name "extensions" in the unzipped folder?
Hi Seema,
I am facing a similar problem. I downloaded my course as a zip file (on Windows 10). When I try and open index.html with Chrome, the course doesn't load. Only the spinner shows up.
When I open the course via mozilla, the course loads properly. I wonder how I can get it to work on Chrome.
Have you been able to resolve your issue? Would appreciate any new findings.
Thanks,
Anita.
Hi Anita, I tried recreating your issue on my machine.
Once you try opening index.html via chrome, press F12.
This would open the chrome inspector and there click on the "console" tab.
Do you find
"Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension,..."
and
"Failed to load resource: net::ERR_FILE_NOT_FOUND"
?
This only works in FireFox. If you work in Chrome or Opera or Maxthon, you can preview from the AT.
That's a pity! But I will stick to Firefox if that's the case.
Anita, I would not recommend running Adapt - or any web content of any level of complexity - locally i.e. by double-clicking the launch page.
Unless it has specifically been set up to run locally, you should always run web content from a web server.
Even though it appears to work in Firefox there will still be things that won't work properly due to local file security.
You can use something like Fenix to quickly set up a local web server from any directory on your computer.
Matt,
Just wanted to let you know that I've been able to get my Adapt content run on a local web server, using Fenix just as you suggested. It was very easy indeed. I wonder why such implementation details are not mentioned in any of the Adapt tutorials online. It would make it so much easier for newbies.
Anyway, thanks a lot for your help. So glad to finally view my content properly.
Anita,
Great, glad it's working.
I wonder why such implementation details are not mentioned in any of the Adapt tutorials online. It would make it so much easier for newbies.
I completely agree and so a couple of weeks ago updated the 'Publish' section of this this wiki page to try to make it clear.
If you have any suggestions for improving the wording to make it even clearer - or can think of any other locations we should include this information, please let me know.