These are chat archives for Learnosity/Support

14th
Sep 2014
barzee
@barzee
Sep 14 2014 02:01 UTC
I'm new to Learnosity and I have a basic question with the Item API. I'm running one of the examples with the java API and I get the correct results until I add some extra properties to the JSON object. For example if I add "time": {
"max_time": 1500,
"limit_type": "soft",
"show_pause": true,
"warning_time": 120,
"show_time": true
}
I get "Signatures do not match" error. Same with "ignore_validation", "assess_inline", "onsubmit_redirect_url" and few others. Does this make sense or I'm missing something simple? Thanks in advance.
Michael Sharman
@michaelsharman
Sep 14 2014 23:28 UTC
Hi, you need to create a signature for every unique request you make
what’s happening is, you’ve generated a signature, then changed the request body
barzee
@barzee
Sep 14 2014 23:28 UTC
I did.
Michael Sharman
@michaelsharman
Sep 14 2014 23:28 UTC
so the server can’t match the signatures
so you’re using the Java SDK?
barzee
@barzee
Sep 14 2014 23:29 UTC
yes
creating signature without time works
with I get the match error
Michael Sharman
@michaelsharman
Sep 14 2014 23:30 UTC
which time?
max_time, warning_time
show_time?
barzee
@barzee
Sep 14 2014 23:30 UTC
time node
Michael Sharman
@michaelsharman
Sep 14 2014 23:30 UTC
oic
barzee
@barzee
Sep 14 2014 23:30 UTC
"time": {
"max_time": 1500,
"limit_type": "soft",
"show_pause": true,
"warning_time": 120,
"show_time": true
}
Michael Sharman
@michaelsharman
Sep 14 2014 23:30 UTC
ok let me review
barzee
@barzee
Sep 14 2014 23:31 UTC
let me send you the json that works and the json that doesn't
Michael Sharman
@michaelsharman
Sep 14 2014 23:31 UTC
ok thanks
barzee
@barzee
Sep 14 2014 23:35 UTC

this one is not working

{
"request": {
"session_id": "6ed210c4-6ead-44a6-b255-6a792d2c4036",
"activity_id": "bllassess",
"items": [
"BARB_6",
"BARB_5 Sample Question"
],
"name": "BLL Items API demo - assess activity",
"state": "initial",
"config": {
"assessApiVersion": "v2",
"questionsApiVersion": "v2",
"title": "Torts Blackletter law Assessment",
"time": {
"max_time": 1500,
"limit_type": "soft",
"show_pause": true,
"warning_time": 120,
"show_time": true
},
"navigation": {
"show_itemcount": true,
"show_intro": true,
"show_outro": true
},
"ui_style": "main",
"subtitle": "Study Hard!!!",
"configuration": {
"fontsize": "normal",
"idle_timeout": {
"interval": 70,
"countdown_time": 60
}
}
},
"user_id": "demo_student",
"course_id": "BARCA",
"type": "submit_practice",
"rendering_type": "assess"
},
"security": {
"timestamp": "20140914-2332",
"consumer_key": "xxxxxxx",
"domain": "localhost",
"user_id": "demo_student3",
"signature": "7273df447aaf6052bb6ff540fbdb2b5f4155deb3d60125e7229495c14e42b9a3"
}
}

This message was deleted

this one is working

{
"request": {
"session_id": "089d65dc-7a30-48c8-be49-a4c8908df954",
"activity_id": "bllassess",
"items": [
"BARB_6",
"BARB_5 Sample Question"
],
"name": "BLL Items API demo - assess activity",
"state": "initial",
"config": {
"assessApiVersion": "v2",
"questionsApiVersion": "v2",
"title": "Torts Blackletter law Assessment",
"navigation": {
"show_itemcount": true,
"show_intro": true,
"show_outro": true
},
"ui_style": "main",
"subtitle": "Study Hard!!!",
"configuration": {
"fontsize": "normal",
"idle_timeout": {
"interval": 70,
"countdown_time": 60
}
}
},
"user_id": "demo_student",
"course_id": "BARCA",
"type": "submit_practice",
"rendering_type": "assess"
},
"security": {
"timestamp": "20140914-2335",
"consumer_key": "xxxxxxx",
"domain": "localhost",
"user_id": "demo_student3",
"signature": "682b0ede4a4486aef450f27f9511c360ef9a63f489637eb6f28befb24bbdf49f"
}
}

barzee
@barzee
Sep 14 2014 23:43 UTC

loading an activity also is failing with LearnosityItems.init(), and signed json object below.

"request": {
"assess_inline": false,
"session_id": "aecbf4d8-5a8f-49dc-a90e-cdd15f23edbe",
"activity_id": "TortsBLL",
"activity_template_id": "BARBRIAssessmentActivity",
"name": "Demo Activity",
"user_id": "demo_student",
"course_id": "demo_yis0TYCu7U9V4o7M"
},
"security": {
"timestamp": "20140914-2141",
"consumer_key": "xxxxxxx",
"domain": "localhost",
"user_id": "demo_student",
"signature": "935fa67c16465235f6c467546c368c3070440e01adac77819b575df22b1c0e4a"
}
}