Git Product home page Git Product logo

Comments (12)

creighton avatar creighton commented on August 17, 2024

Is there an example client I could try? What about https://lrs.adlnet.gov/prototypes/ ? Does that work? Also we have those prototypes at https://github.com/creighton/experienceapi_client_examples . You could download them and see if they work. Sorry, I'm just trying to figure out if this is a bug in the LRS.

According to the spec, all requests and responses need to have the X-Experience-API-Version header. See https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#apiversioning .. For example in https://lrs.adlnet.gov/prototypes/StatementViewer/index.html, you should see the header in both the request and response.

In the .95 version I took the header requirement off of /statements just so people could use the link you pasted and see results without having to deal with headers. Maybe I could do that again on the hosted LRS but it would technically not be conformant to the spec anymore.

from adl_lrs.

gazzastone avatar gazzastone commented on August 17, 2024

Hi Tom

https://lrs.adlnet.gov/prototypes/ does not work returning Bad Response Missing X-Experience-API-Version header,

I have downloaded the client_examples which I actually can’t get to work against my own installation or indeed the hosted lrs (cannot give you access to my installation localhost only I’m afraid)

Example https://lrs.adlnet.gov/prototypes/StatementViewer/index.html Fiddler shows the following Headers

Reequest Header:

GET /prototypes/StatementViewer/index.html HTTP/1.1

Accept: text/html, application/xhtml+xml, /

Accept-Language: en-GB

User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)

Accept-Encoding: gzip, deflate

Host: lrs.adlnet.gov

If-Modified-Since: Fri, 24 May 2013 15:04:31 GMT

DNT: 1

Connection: Keep-Alive

Response Header:

HTTP/1.1 304 Not Modified

Server: nginx/1.1.19

Date: Fri, 31 May 2013 12:18:49 GMT

Last-Modified: Fri, 24 May 2013 15:04:31 GMT

Connection: keep-alive

From: tom creighton [mailto:[email protected]]
Sent: 31 May 2013 13:00
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)

Is there an example client I could try? What about https://lrs.adlnet.gov/prototypes/ ? Does that work? Also we have those prototypes at https://github.com/creighton/experienceapi_client_examples . You could download them and see if they work. Sorry, I'm just trying to figure out if this is a bug in the LRS.

According to the spec, all requests and responses need to have the X-Experience-API-Version header. See https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#apiversioning .. For example in https://lrs.adlnet.gov/prototypes/StatementViewer/index.html, you should see the header in both the request and response.

In the .95 version I took the header requirement off of /statements just so people could use the link you pasted and see results without having to deal with headers. Maybe I could do that again on the hosted LRS but it would technically not be conformant to the spec anymore.


Reply to this email directly or view it on GitHub #160 (comment) . https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13

from adl_lrs.

creighton avatar creighton commented on August 17, 2024

Sorry gazza, when I hit https://lrs.adlnet.gov/prototypes the requests have headers. (I'll attach the output from Chrome's debugger below)

Could your browser be caching? Your headers also don't have Authorization, and the response headers have none of the headers I was expecting to see, like the X-Experience-API-Version

Also, try this cURL command: curl -H "X-Experience-API-Version:1.0.0" --user tom:1234 https://lrs.adlnet.gov/xapi/statements?limit=1 That should give you a response.

----- Chrome debugger output -----
Request URL:https://lrs.adlnet.gov/XAPI/statements?limit=25&format=exact
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:/
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Authorization:Basic dG9tOjEyMzQ=
Connection:keep-alive
Content-Type:application/json
Cookie:__utma=40047858.1688851668.1330898169.1368210538.1369250074.51; __utmz=40047858.1361567553.26.4.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=http://www.adlnet.gov/); csrftoken=JBJbpRe2fnaQ0u62Sb79wAV4MD1aFGi9; sessionid=4565f9f6bbffa5a237b9f6e0132e2aa5
Host:lrs.adlnet.gov
Referer:https://lrs.adlnet.gov/prototypes/StatementViewer/index.html
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36
X-Experience-API-Version:1.0
Query String Parametersview sourceview URL encoded
limit:25
format:exact
Response Headersview source
Access-Control-Allow-Headers:Content-Type,Content-Length,Authorization,If-Match,If-None-Match,X-Experience-API-Version, Accept-Language
Access-Control-Allow-Methods:HEAD, POST, GET, OPTIONS, DELETE, PUT
Access-Control-Allow-Origin:*
Access-Control-Expose-Headers:ETag,Last-Modified,Cache-Control,Content-Type,Content-Length,WWW-Authenticate,X-Experience-API-Version, Accept-Language
Connection:keep-alive
Content-Length:26784
Content-Type:application/json
Date:Fri, 31 May 2013 11:43:02 GMT
Server:gunicorn/0.14.2
X-Experience-API-Consistent-Through:2013-05-28 13:55:33.912693+00:00
X-Experience-API-Version:1.0.0
X-Frame-Options:SAMEORIGIN

from adl_lrs.

gazzastone avatar gazzastone commented on August 17, 2024

Hi Tom,

Its looking like an IE 10 problem the prototypes are working fine using Firefox, will do some more digging and see if my installation is working under firefox

Gary

From: tom creighton [mailto:[email protected]]
Sent: 31 May 2013 13:57
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)

Sorry gazza, when I hit https://lrs.adlnet.gov/prototypes the requests have headers. (I'll attach the output from Chrome's debugger below)

Could your browser be caching? Your headers also don't have Authorization, and the response headers have none of the headers I was expecting to see, like the X-Experience-API-Version

Also, try this cURL command: curl -H "X-Experience-API-Version:1.0.0" --user tom:1234 https://lrs.adlnet.gov/xapi/statements?limit=1 That should give you a response.

Request URL:https://lrs.adlnet.gov/XAPI/statements?limit=25&format=exact
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:/
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Authorization:Basic dG9tOjEyMzQ=
Connection:keep-alive
Content-Type:application/json
Cookie:__utma=40047858.1688851668.1330898169.1368210538.1369250074.51; __utmz=40047858.1361567553.26.4.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=http://www.adlnet.gov/); csrftoken=JBJbpRe2fnaQ0u62Sb79wAV4MD1aFGi9; sessionid=4565f9f6bbffa5a237b9f6e0132e2aa5
Host:lrs.adlnet.gov
Referer:https://lrs.adlnet.gov/prototypes/StatementViewer/index.html
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36
X-Experience-API-Version:1.0
Query String Parametersview sourceview URL encoded
limit:25
format:exact
Response Headersview source
Access-Control-Allow-Headers:Content-Type,Content-Length,Authorization,If-Match,If-None-Match,X-Experience-API-Version, Accept-Language
Access-Control-Allow-Methods:HEAD, POST, GET, OPTIONS, DELETE, PUT
Access-Control-Allow-Origin:*
Access-Control-Expose-Headers:ETag,Last-Modified,Cache-Control,Content-Type,Content-Length,WWW-Authenticate,X-Experience-API-Version, Accept-Language
Connection:keep-alive
Content-Length:26784
Content-Type:application/json
Date:Fri, 31 May 2013 11:43:02 GMT
Server:gunicorn/0.14.2
X-Experience-API-Consistent-Through:2013-05-28 13:55:33.912693+00:00
X-Experience-API-Version:1.0.0
X-Frame-Options:SAMEORIGIN


Reply to this email directly or view it on GitHub #160 (comment) . https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13

from adl_lrs.

creighton avatar creighton commented on August 17, 2024

Oooh yeah, sorry I thought your header was saying you were using Firefox. My bad for not catching that. The prototypes don't work with IE. I don't remember the exact issue but it has to do with the way IE sends requests. There is an IE example in the spec, if you're adventurous you could try that example, but the way the prototypes do requests won't work right in IE.

from adl_lrs.

gazzastone avatar gazzastone commented on August 17, 2024

Thanks Tom, was trying the tetris prototype against my installation and got the following

Activity definition type media is not a valid URI

Probably something I did wrong on the installation can you point me in a direction to have a look at

Thanks

From: tom creighton [mailto:[email protected]]
Sent: 31 May 2013 14:16
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)

Oooh yeah, sorry I thought your header was saying you were using Firefox. My bad for not catching that. The prototypes don't work with IE. I don't remember the exact issue but it has to do with the way IE sends requests. There is an IE example in the spec, if you're adventurous you could try that example, but the way the prototypes do requests won't work right in IE.


Reply to this email directly or view it on GitHub #160 (comment) . https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13

from adl_lrs.

ljwolford avatar ljwolford commented on August 17, 2024

Hi Gary,

For the 'media' issue you're having, make sure the prototypes you're
running are from the 1.0 folder. The tetris examples create a statement and
use 'media' as the activity definition type in the 0.95 prototypes but that
had to be changed to be xAPI 1.0.0 conformant to 'type:media' in the 1.0
prototypes folder.

Thanks,
Lou

On Fri, May 31, 2013 at 9:19 AM, gazzastone [email protected]:

Thanks Tom, was trying the tetris prototype against my installation and
got the following

Activity definition type media is not a valid URI

Probably something I did wrong on the installation can you point me in a
direction to have a look at

Thanks

From: tom creighton [mailto:[email protected]]
Sent: 31 May 2013 14:16
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)

Oooh yeah, sorry I thought your header was saying you were using Firefox.
My bad for not catching that. The prototypes don't work with IE. I don't
remember the exact issue but it has to do with the way IE sends requests.
There is an IE example in the spec, if you're adventurous you could try
that example, but the way the prototypes do requests won't work right in
IE.


Reply to this email directly or view it on GitHub <
https://github.com/adlnet/ADL_LRS/issues/160#issuecomment-18744049> . <
https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif>


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13

Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-18744211
.

Lou Wolford
Advanced Distributed Learning (ADL)
Technical Team

from adl_lrs.

gazzastone avatar gazzastone commented on August 17, 2024

Hi Lou,

I am running from the 1.0 Folder, are you referring to the TC_Tetris.js files for the definition which appear identical in the 0.95 and 1.0 folders

Thanks

Gary

From: Lou Wolford [mailto:[email protected]]
Sent: 31 May 2013 15:49
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)

Hi Gary,

For the 'media' issue you're having, make sure the prototypes you're
running are from the 1.0 folder. The tetris examples create a statement and
use 'media' as the activity definition type in the 0.95 prototypes but that
had to be changed to be xAPI 1.0.0 conformant to 'type:media' in the 1.0
prototypes folder.

Thanks,
Lou

On Fri, May 31, 2013 at 9:19 AM, gazzastone [email protected]:

Thanks Tom, was trying the tetris prototype against my installation and
got the following

Activity definition type media is not a valid URI

Probably something I did wrong on the installation can you point me in a
direction to have a look at

Thanks

From: tom creighton [mailto:[email protected]]
Sent: 31 May 2013 14:16
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)

Oooh yeah, sorry I thought your header was saying you were using Firefox.
My bad for not catching that. The prototypes don't work with IE. I don't
remember the exact issue but it has to do with the way IE sends requests.
There is an IE example in the spec, if you're adventurous you could try
that example, but the way the prototypes do requests won't work right in
IE.


Reply to this email directly or view it on GitHub <
https://github.com/adlnet/ADL_LRS/issues/160#issuecomment-18744049> . <
https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif>


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13

Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-18744211
.

Lou Wolford
Advanced Distributed Learning (ADL)
Technical Team


Reply to this email directly or view it on GitHub #160 (comment) . https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13

from adl_lrs.

ljwolford avatar ljwolford commented on August 17, 2024

Yup that's the file I'm referring too. We pushed out the change at the end of last week so your local repository might be out of sync. Try pulling down the new prototype examples from master and try that.

from adl_lrs.

gazzastone avatar gazzastone commented on August 17, 2024

Mmmm, modifying lines 100 and 122 from type:”media” to type: “http://adlnet.gov/expapi/activities/media “ did the trick am I missing something on my local installation ?

Thanks

Gary

From: Lou Wolford [mailto:[email protected]]
Sent: 31 May 2013 16:29
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)

Yup that's the file I'm referring too. We pushed out the change at the end of last week so your local repository might be out of sync. Try pulling down the new prototype examples from master and try that.


Reply to this email directly or view it on GitHub #160 (comment) . https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13

from adl_lrs.

ljwolford avatar ljwolford commented on August 17, 2024

It appears that your local installation is out of date. If you pull down
the current changes from git to your local repository, it should fix all of
the issues you're having.

Thanks,
Lou

On Fri, May 31, 2013 at 11:49 AM, gazzastone [email protected]:

Mmmm, modifying lines 100 and 122 from type:”media” to type: “
http://adlnet.gov/expapi/activities/media “ did the trick am I missing
something on my local installation ?

Thanks

Gary

From: Lou Wolford [mailto:[email protected]]
Sent: 31 May 2013 16:29
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)

Yup that's the file I'm referring too. We pushed out the change at the end
of last week so your local repository might be out of sync. Try pulling
down the new prototype examples from master and try that.


Reply to this email directly or view it on GitHub <
https://github.com/adlnet/ADL_LRS/issues/160#issuecomment-18752053> . <
https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif>


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13

Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-18753466
.

Lou Wolford
Advanced Distributed Learning (ADL)
Technical Team

from adl_lrs.

creighton avatar creighton commented on August 17, 2024

Gary,

We hope you got everything working for you. If you have any other issues, feedback, or questions, please let us know. I'm closing this for now.. If it's not resolved feel free to reopen with any new information.

regards,

tom

from adl_lrs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.