Highlighted

Submit Multiple Text-Entry Boxes with Scoring

Explorer ,
Dec 23, 2017

Copy link to clipboard

Copied

Hello all,

I'm using Captivate 10, and I am trying to do the following:

  • Ask a user a question
  • The user should have 5 text entry boxes to answer
  • Each text entry box should be worth 1 point and is reported in the quiz itself
  • Do not show the user the correct answer or provide feedback, just move to the next question

I know this is going to require some advanced actions or some JS. I've read into other posts on here and have created a "submit all" button, and while I can make them work if the TEB's aren't graded, I can't seem to get it to work if they are graded. I've also tried researching this, but can't seem to find a solution that would fit the problem at hand. Does anyone have any recommendations on this topic?

I am going to update this with a modified solution that Steven Warwick posted (link to the original post):

If you create a Quiz slide with "Fill-in-the-blanks", and you have several blanks, the answers are stored as Answer1;Answer2;Answer3;Answer4, etc.

I created a variable that stores the correct answers that I wanted to be scored in the variable CorAns. I then defaulted a variable to the chosen answers, then split them so that appear as an array. I then graded each array based on the CorAns variable. I am probably not explaining it very well, as I am still very new to JavaScript, but I hope that someone may find this useful.

var slideID = $('[id^=Slide]').attr("id");

var quizObject = cp.getQuestionObject(slideID);

var CorAns = ["California", "Oregon", "Washington", "Hawaii", "Alaska"]

quizObject.getQuestionScoredPoints()

quizObject.__proto__.getQuestionScoredPoints = function () {

var score = 0

var theAnswers = this.getChosenAnswerAsString();

var theTest = theAnswers.split(';');

if (theTest[0] == CorAns[0]) {score = score + 1}

if (theTest[1] == CorAns[1]) {score = score + 1}

if (theTest[2] == CorAns[2]) {score = score + 1}

if (theTest[3] == CorAns[3]) {score = score + 1}

if (theTest[4] == CorAns[4]) {score = score + 1}

return score;

}

Views

481

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Submit Multiple Text-Entry Boxes with Scoring

Explorer ,
Dec 23, 2017

Copy link to clipboard

Copied

Hello all,

I'm using Captivate 10, and I am trying to do the following:

  • Ask a user a question
  • The user should have 5 text entry boxes to answer
  • Each text entry box should be worth 1 point and is reported in the quiz itself
  • Do not show the user the correct answer or provide feedback, just move to the next question

I know this is going to require some advanced actions or some JS. I've read into other posts on here and have created a "submit all" button, and while I can make them work if the TEB's aren't graded, I can't seem to get it to work if they are graded. I've also tried researching this, but can't seem to find a solution that would fit the problem at hand. Does anyone have any recommendations on this topic?

I am going to update this with a modified solution that Steven Warwick posted (link to the original post):

If you create a Quiz slide with "Fill-in-the-blanks", and you have several blanks, the answers are stored as Answer1;Answer2;Answer3;Answer4, etc.

I created a variable that stores the correct answers that I wanted to be scored in the variable CorAns. I then defaulted a variable to the chosen answers, then split them so that appear as an array. I then graded each array based on the CorAns variable. I am probably not explaining it very well, as I am still very new to JavaScript, but I hope that someone may find this useful.

var slideID = $('[id^=Slide]').attr("id");

var quizObject = cp.getQuestionObject(slideID);

var CorAns = ["California", "Oregon", "Washington", "Hawaii", "Alaska"]

quizObject.getQuestionScoredPoints()

quizObject.__proto__.getQuestionScoredPoints = function () {

var score = 0

var theAnswers = this.getChosenAnswerAsString();

var theTest = theAnswers.split(';');

if (theTest[0] == CorAns[0]) {score = score + 1}

if (theTest[1] == CorAns[1]) {score = score + 1}

if (theTest[2] == CorAns[2]) {score = score + 1}

if (theTest[3] == CorAns[3]) {score = score + 1}

if (theTest[4] == CorAns[4]) {score = score + 1}

return score;

}

Views

482

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 23, 2017 0
Most Valuable Participant ,
Dec 23, 2017

Copy link to clipboard

Copied

I don't know exactly what yoy want to change? Text Entry Boxes can be scored individually if they are validated (have a correct answer). The score can be repoted and is automatically included in the Quizzing System variables. Have a look at the Advanced Interaction panel (F9). The Feedback messages are the normal ones for an interactive object, you can uncheck them.

Submit All is a quiz feature which I would not use in this case. It makes sense if you want to allow users to skip quiz slides and allow them free navigation, they'll decide when all quiz slides have been completed to submit all results at once. But I thought you were not talking about several slides.

I seem to miss something in the question. Did you read these blog posts:

One Submit button for Multiple Text Entry Boxes? - Captivate blog

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 23, 2017 0
Explorer ,
Dec 23, 2017

Copy link to clipboard

Copied

My apologies, let me explain further.

I understand that each TEB can be scored individually, but the score is not reporting unless I use the shortcut key or the submit button that auto-generates. I need 5 TEB's on one page, the user should not use the shortcut key or the auto-generated submit every time to transmit the answer.

I want to create a submit button that will submit all 5 TEB answers to be graded at once. I do not need to provide the user feedback, I just need the scores to be sent to Captivate.

As mentioned, I have already read blog-posts and the forum posts. I have created a "Submit" button that can be used for validation and will move to the next slide, but it's not reporting the score.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 23, 2017 0
Most Valuable Participant ,
Dec 23, 2017

Copy link to clipboard

Copied

In that blog post I do use one Submit button. It is not possible to prevent a score for a TEB to be reported later on. Maybe with custom programming in JS, not with advanced actions.  You'll have to wait for a JS expert.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 23, 2017 0
Explorer ,
Dec 23, 2017

Copy link to clipboard

Copied

Correct, that is what I came to ask for further help. The post made sense, and it helped me get the single submit button, but it did not allow me to grade.

I appreciate the effort .

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 23, 2017 0
Most Valuable Participant ,
Dec 23, 2017

Copy link to clipboard

Copied

Post was for validated TEB's, i don't know why scoring is not working for you. Unless something has changed in 2017, because I didn't test out that workflow again in the most recent version. Did you insert the quizzing system variable cpQuizInfoPointsscored to check if the scoring is working?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 23, 2017 0
Explorer ,
Dec 23, 2017

Copy link to clipboard

Copied

I did mention that I needed scoring in the title, my apologies if my post didn't reflect that.

I did insert the cpQuizInfoPointsScored to check if the scoring was working, but sadly it is not. It just shows blank until I either hit the "enter" shortcut key or the button.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 23, 2017 0
Explorer ,
Dec 24, 2017

Copy link to clipboard

Copied

I am going to update this with a modified solution that Steven Warwick posted (link to the original post):

If you create a Quiz slide with "Fill-in-the-blanks", and you have several blanks, the answers are stored as Answer1;Answer2;Answer3;Answer4, etc.

I created a variable that stores the correct answers that I wanted to be scored in the variable CorAns. I then defaulted a variable to the chosen answers, then split them so that appear as an array. I then graded each array based on the CorAns variable. I am probably not explaining it very well, as I am still very new to JavaScript, but I hope that someone may find this useful.

var slideID = $('[id^=Slide]').attr("id");

var quizObject = cp.getQuestionObject(slideID);

var CorAns = ["California", "Oregon", "Washington", "Hawaii", "Alaska"]

quizObject.getQuestionScoredPoints()

quizObject.__proto__.getQuestionScoredPoints = function () {

var score = 0

var theAnswers = this.getChosenAnswerAsString();

var theTest = theAnswers.split(';');

if (theTest[0] == CorAns[0]) {score = score + 1}

if (theTest[1] == CorAns[1]) {score = score + 1}

if (theTest[2] == CorAns[2]) {score = score + 1}

if (theTest[3] == CorAns[3]) {score = score + 1}

if (theTest[4] == CorAns[4]) {score = score + 1}

return score;

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 24, 2017 0
donalall LATEST
Engaged ,
Sep 04, 2020

Copy link to clipboard

Copied

Hi heinzzt96 (or anyone else),

What slide setup did you use for this e.g.

  • blank screen / question screen ?
  • added text entry boxes but just included one of the Submit buttons ?
  • text entry boxes were validated ... included in quiz (what other Reporting options were choosen) etc ?

 

Regards

Donal.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 04, 2020 0