Skip to main content
Inspiring
December 23, 2017
Answered

Submit Multiple Text-Entry Boxes with Scoring

  • December 23, 2017
  • 2 replies
  • 1102 views

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?

    This topic has been closed for replies.
    Correct answer heintzt96

    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;

    }

    2 replies

    heintzt96AuthorCorrect answer
    Inspiring
    December 24, 2017

    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;

    }

    Inspiring
    September 4, 2020

    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.

    Lilybiri
    Legend
    December 23, 2017

    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

    heintzt96Author
    Inspiring
    December 23, 2017

    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.

    Lilybiri
    Legend
    December 23, 2017

    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.