Skip to main content
Inspiring
August 17, 2018
Answered

Learner Quiz Answers Contain %20 when published xAPI

  • August 17, 2018
  • 2 replies
  • 868 views

Hello,

I have unwanted characters showing up within the Quiz responses when publishing quizzes xAPI in Captivate 2017.

Within the answer selections to choose from, there are spaces within the answers.  Example quiz question setup:

Q. Which activity do you like to do in the morning?

1. Take a nice walk

2. Go for a swim

When I publish Captivate xAPI to an external LRS and view the xAPI Activity Statement, everywhere within the response wording where there was once a space, a %20 was substituted.  It does not insert %20 within the question wording itself, just the response wording.

Here's what I get:

"success": true,

"response": "urn:scormdriver:All%20of%20the%20above"

Here is what I want:

"response": "All of the above"

How do I get Captivate to NOT INSERT  urn:scormdriver: AND %20 in the response?  I cannot give this to my client without cleanup work.

Any guidance around this would be greatly appreciated.

Thank you,

Sharon

This topic has been closed for replies.
Correct answer chrismay_at_delta6226261

Your text is being URL encoded. A lot of text passed back and forth to servers have this done, so special characters that could mean something different to a server will be replaced with "code". This helps prevent errors on the server side

This might not be a huge issue, the URL encoding could be reverted back to normal text when the server runs a report/displays the data. If it is not done automatically, there are commands in most programming languages to convert this, so it should not be hard for the person generating reports to add that functionality.

2 replies

chrismay_at_delta6226261
Inspiring
August 27, 2018

Correct. Or even pull a report and see if it is automatically corrected.

Inspiring
August 28, 2018

Hi Chris,

I contacted my LRS folks and you were correct.  Here was their response, "The way xAPI defines
question statements is that the response and the correctResponsepattern
properties (the two you highlighted) use ids for the response. The statement is
then also supposed to contain a map of ids to the actual responses in plain
text (potentially in multiple languages). For multiple choice questions, the
map is included in a property called "choices". However, the choices
property is optional (because not every xAPI statement is a multiple choice
question), and Captivate does not include it." 

My LRS folks provided a fix for me to implement in the coding.  Thank you for steering me in the right direction.  This problem is now resolved.

VickieM
Participating Frequently
August 27, 2018

Hi Sharon,

 

Look at the xAPI Prototypes at xAPI.com. You might find the prototypes helpful and they may give more insight.  The information might guide you in the direction of resolving your issue.

 

xAPI Information about the Prototypes

xAPI Prototypes

 

Thanks

Inspiring
August 27, 2018

Hello.  Thank you for replying. Unfortunately I don't see anything that would solution this. :(

chrismay_at_delta6226261
Inspiring
August 27, 2018

Your text is being URL encoded. A lot of text passed back and forth to servers have this done, so special characters that could mean something different to a server will be replaced with "code". This helps prevent errors on the server side

This might not be a huge issue, the URL encoding could be reverted back to normal text when the server runs a report/displays the data. If it is not done automatically, there are commands in most programming languages to convert this, so it should not be hard for the person generating reports to add that functionality.